From fa348655fc1228d3f7ad12c73b37c9b1536ac6ae Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 24 Jun 2025 19:38:56 +0000 Subject: [PATCH 1/2] chore: Update generation configuration at Tue Jun 24 19:38:49 UTC 2025 --- generation_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generation_config.yaml b/generation_config.yaml index 0582d0e3a91f..bb8ef5c77284 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.59.0 -googleapis_commitish: 34b323e7ee72888dd9337cce8b24233ae078f23b +googleapis_commitish: fc1e32c211bbb46c7213ffa68fe3273da16ab358 libraries_bom_version: 26.61.0 # the libraries are ordered with respect to library name, which is From 666b78129199f031549846fe576817ac4070dbdc Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Tue, 24 Jun 2025 19:44:44 +0000 Subject: [PATCH 2/2] chore: generate libraries at Tue Jun 24 19:41:02 UTC 2025 --- java-developerconnect/README.md | 8 +- .../v1/DeveloperConnectClient.java | 1955 +++- .../v1/DeveloperConnectSettings.java | 187 + .../v1/InsightsConfigServiceClient.java | 1432 +++ .../v1/InsightsConfigServiceSettings.java | 369 + .../developerconnect/v1/gapic_metadata.json | 60 + .../developerconnect/v1/package-info.java | 26 + .../v1/stub/DeveloperConnectStub.java | 97 + .../v1/stub/DeveloperConnectStubSettings.java | 619 ++ .../v1/stub/GrpcDeveloperConnectStub.java | 430 + ...cInsightsConfigServiceCallableFactory.java | 113 + .../stub/GrpcInsightsConfigServiceStub.java | 438 + .../v1/stub/HttpJsonDeveloperConnectStub.java | 756 ++ ...nInsightsConfigServiceCallableFactory.java | 101 + .../HttpJsonInsightsConfigServiceStub.java | 713 ++ .../v1/stub/InsightsConfigServiceStub.java | 118 + .../InsightsConfigServiceStubSettings.java | 805 ++ .../reflect-config.json | 729 +- .../DeveloperConnectClientHttpJsonTest.java | 1009 ++ .../v1/DeveloperConnectClientTest.java | 896 ++ ...sightsConfigServiceClientHttpJsonTest.java | 730 ++ .../v1/InsightsConfigServiceClientTest.java | 665 ++ .../v1/MockDeveloperConnectImpl.java | 212 + .../v1/MockInsightsConfigService.java | 59 + .../v1/MockInsightsConfigServiceImpl.java | 170 + .../v1/DeveloperConnectGrpc.java | 1420 ++- .../v1/InsightsConfigServiceGrpc.java | 1021 ++ .../developerconnect/v1/AccountConnector.java | 2730 ++++++ .../v1/AccountConnectorName.java | 227 + .../v1/AccountConnectorOrBuilder.java | 362 + .../developerconnect/v1/AppHubWorkload.java | 1040 ++ .../v1/AppHubWorkloadOrBuilder.java | 112 + .../developerconnect/v1/ArtifactConfig.java | 1518 +++ .../v1/ArtifactConfigOrBuilder.java | 155 + .../v1/BitbucketCloudConfig.java | 1572 +++ .../v1/BitbucketCloudConfigOrBuilder.java | 192 + .../v1/BitbucketDataCenterConfig.java | 2297 +++++ .../BitbucketDataCenterConfigOrBuilder.java | 294 + .../cloud/developerconnect/v1/Connection.java | 1273 ++- .../v1/ConnectionOrBuilder.java | 140 +- .../v1/CreateAccountConnectorRequest.java | 1562 +++ ...reateAccountConnectorRequestOrBuilder.java | 198 + .../v1/CreateInsightsConfigRequest.java | 1261 +++ .../CreateInsightsConfigRequestOrBuilder.java | 138 + .../v1/DeleteAccountConnectorRequest.java | 1359 +++ ...eleteAccountConnectorRequestOrBuilder.java | 170 + .../v1/DeleteInsightsConfigRequest.java | 1245 +++ .../DeleteInsightsConfigRequestOrBuilder.java | 153 + .../v1/DeleteSelfRequest.java | 649 ++ .../v1/DeleteSelfRequestOrBuilder.java | 56 + .../v1/DeleteUserRequest.java | 1236 +++ .../v1/DeleteUserRequestOrBuilder.java | 153 + .../v1/DeveloperConnectProto.java | 868 +- .../developerconnect/v1/ExchangeError.java | 830 ++ .../v1/ExchangeErrorOrBuilder.java | 80 + .../v1/FetchAccessTokenRequest.java | 660 ++ .../v1/FetchAccessTokenRequestOrBuilder.java | 58 + .../v1/FetchAccessTokenResponse.java | 1504 +++ .../v1/FetchAccessTokenResponseOrBuilder.java | 180 + .../developerconnect/v1/FetchSelfRequest.java | 649 ++ .../v1/FetchSelfRequestOrBuilder.java | 56 + .../developerconnect/v1/GKEWorkload.java | 865 ++ .../v1/GKEWorkloadOrBuilder.java | 90 + .../v1/GetAccountConnectorRequest.java | 656 ++ .../GetAccountConnectorRequestOrBuilder.java | 56 + .../v1/GetInsightsConfigRequest.java | 653 ++ .../v1/GetInsightsConfigRequestOrBuilder.java | 56 + .../developerconnect/v1/GitProxyConfig.java | 545 + .../v1/GitProxyConfigOrBuilder.java | 40 + .../v1/GitRepositoryLink.java | 224 +- .../v1/GitRepositoryLinkOrBuilder.java | 36 +- .../v1/GoogleArtifactAnalysis.java | 635 ++ .../v1/GoogleArtifactAnalysisOrBuilder.java | 52 + .../v1/GoogleArtifactRegistry.java | 838 ++ .../v1/GoogleArtifactRegistryOrBuilder.java | 82 + .../developerconnect/v1/InsightsConfig.java | 4521 +++++++++ .../v1/InsightsConfigName.java | 227 + .../v1/InsightsConfigOrBuilder.java | 580 ++ .../v1/InsightsConfigProto.java | 422 + .../v1/ListAccountConnectorsRequest.java | 1326 +++ ...ListAccountConnectorsRequestOrBuilder.java | 148 + .../v1/ListAccountConnectorsResponse.java | 1494 +++ ...istAccountConnectorsResponseOrBuilder.java | 168 + .../v1/ListInsightsConfigsRequest.java | 1345 +++ .../ListInsightsConfigsRequestOrBuilder.java | 154 + .../v1/ListInsightsConfigsResponse.java | 1463 +++ .../ListInsightsConfigsResponseOrBuilder.java | 163 + .../developerconnect/v1/ListUsersRequest.java | 1317 +++ .../v1/ListUsersRequestOrBuilder.java | 148 + .../v1/ListUsersResponse.java | 1439 +++ .../v1/ListUsersResponseOrBuilder.java | 162 + .../v1/ProviderOAuthConfig.java | 1070 ++ .../v1/ProviderOAuthConfigOrBuilder.java | 136 + .../developerconnect/v1/RuntimeConfig.java | 1823 ++++ .../v1/RuntimeConfigOrBuilder.java | 180 + .../developerconnect/v1/SystemProvider.java | 343 + .../v1/UpdateAccountConnectorRequest.java | 1562 +++ ...pdateAccountConnectorRequestOrBuilder.java | 192 + .../v1/UpdateInsightsConfigRequest.java | 1269 +++ .../UpdateInsightsConfigRequestOrBuilder.java | 153 + .../cloud/developerconnect/v1/User.java | 1455 +++ .../cloud/developerconnect/v1/UserName.java | 268 + .../developerconnect/v1/UserOrBuilder.java | 165 + .../v1/developer_connect.proto | 647 +- .../developerconnect/v1/insights_config.proto | 452 + .../AsyncCreateAccountConnector.java | 55 + .../AsyncCreateAccountConnectorLRO.java | 55 + .../SyncCreateAccountConnector.java | 50 + ...torLocationnameAccountconnectorString.java | 48 + ...ConnectorStringAccountconnectorString.java | 47 + .../AsyncDeleteAccountConnector.java | 56 + .../AsyncDeleteAccountConnectorLRO.java | 57 + .../SyncDeleteAccountConnector.java | 52 + ...eAccountConnectorAccountconnectorname.java | 43 + .../SyncDeleteAccountConnectorString.java | 43 + .../deleteself/AsyncDeleteSelf.java | 51 + .../deleteself/AsyncDeleteSelfLRO.java | 53 + .../deleteself/SyncDeleteSelf.java | 48 + .../SyncDeleteSelfAccountconnectorname.java | 43 + .../deleteself/SyncDeleteSelfString.java | 43 + .../deleteuser/AsyncDeleteUser.java | 54 + .../deleteuser/AsyncDeleteUserLRO.java | 56 + .../deleteuser/SyncDeleteUser.java | 51 + .../deleteuser/SyncDeleteUserString.java | 43 + .../deleteuser/SyncDeleteUserUsername.java | 42 + .../AsyncFetchAccessToken.java | 52 + .../SyncFetchAccessToken.java | 48 + ...cFetchAccessTokenAccountconnectorname.java | 43 + .../SyncFetchAccessTokenString.java | 43 + .../fetchself/AsyncFetchSelf.java | 51 + .../fetchself/SyncFetchSelf.java | 48 + .../SyncFetchSelfAccountconnectorname.java | 43 + .../fetchself/SyncFetchSelfString.java | 43 + .../AsyncGetAccountConnector.java | 52 + .../SyncGetAccountConnector.java | 48 + ...tAccountConnectorAccountconnectorname.java | 43 + .../SyncGetAccountConnectorString.java | 43 + .../AsyncListAccountConnectors.java | 56 + .../AsyncListAccountConnectorsPaged.java | 64 + .../SyncListAccountConnectors.java | 53 + ...SyncListAccountConnectorsLocationname.java | 45 + .../SyncListAccountConnectorsString.java | 45 + .../listusers/AsyncListUsers.java | 57 + .../listusers/AsyncListUsersPaged.java | 65 + .../listusers/SyncListUsers.java | 54 + .../SyncListUsersAccountconnectorname.java | 45 + .../listusers/SyncListUsersString.java | 45 + .../AsyncUpdateAccountConnector.java | 55 + .../AsyncUpdateAccountConnectorLRO.java | 55 + .../SyncUpdateAccountConnector.java | 50 + ...untConnectorAccountconnectorFieldmask.java | 44 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../AsyncCreateInsightsConfig.java | 55 + .../AsyncCreateInsightsConfigLRO.java | 55 + .../SyncCreateInsightsConfig.java | 51 + ...onfigLocationnameInsightsconfigString.java | 48 + ...ightsConfigStringInsightsconfigString.java | 48 + .../AsyncDeleteInsightsConfig.java | 55 + .../AsyncDeleteInsightsConfigLRO.java | 56 + .../SyncDeleteInsightsConfig.java | 51 + ...eleteInsightsConfigInsightsconfigname.java | 44 + .../SyncDeleteInsightsConfigString.java | 44 + .../AsyncGetInsightsConfig.java | 52 + .../SyncGetInsightsConfig.java | 48 + ...ncGetInsightsConfigInsightsconfigname.java | 44 + .../SyncGetInsightsConfigString.java | 44 + .../getlocation/AsyncGetLocation.java | 47 + .../getlocation/SyncGetLocation.java | 43 + .../AsyncListInsightsConfigs.java | 57 + .../AsyncListInsightsConfigsPaged.java | 65 + .../SyncListInsightsConfigs.java | 54 + .../SyncListInsightsConfigsLocationname.java | 46 + .../SyncListInsightsConfigsString.java | 46 + .../listlocations/AsyncListLocations.java | 55 + .../AsyncListLocationsPaged.java | 63 + .../listlocations/SyncListLocations.java | 51 + .../AsyncUpdateInsightsConfig.java | 54 + .../AsyncUpdateInsightsConfigLRO.java | 54 + .../SyncUpdateInsightsConfig.java | 50 + .../SyncCreateInsightsConfig.java | 54 + .../SyncGetInsightsConfig.java | 57 + .../SyncCreateInsightsConfig.java | 54 + .../SyncGetInsightsConfig.java | 57 + .../README.md | 8 +- java-monitoring/README.md | 8 +- java-networkservices/README.md | 8 +- .../networkservices/v1/DepServiceClient.java | 1175 ++- .../v1/DepServiceSettings.java | 99 + .../v1/NetworkServicesClient.java | 2068 +++- .../v1/NetworkServicesSettings.java | 176 + .../networkservices/v1/gapic_metadata.json | 42 + .../v1/stub/DepServiceStub.java | 52 + .../v1/stub/DepServiceStubSettings.java | 344 + .../v1/stub/GrpcDepServiceStub.java | 224 + .../v1/stub/GrpcNetworkServicesStub.java | 403 + .../v1/stub/HttpJsonDepServiceStub.java | 387 + .../v1/stub/HttpJsonNetworkServicesStub.java | 681 +- .../v1/stub/NetworkServicesStub.java | 93 + .../v1/stub/NetworkServicesStubSettings.java | 603 ++ .../reflect-config.json | 441 + .../v1/DepServiceClientHttpJsonTest.java | 543 + .../v1/DepServiceClientTest.java | 478 + .../v1/MockDepServiceImpl.java | 109 + .../v1/MockNetworkServicesImpl.java | 194 + .../v1/NetworkServicesClientHttpJsonTest.java | 939 ++ .../v1/NetworkServicesClientTest.java | 855 ++ .../networkservices/v1/DepServiceGrpc.java | 674 ++ .../v1/NetworkServicesGrpc.java | 1365 ++- .../networkservices/v1/AuthzExtension.java | 3811 +++++++ .../v1/AuthzExtensionName.java | 227 + .../v1/AuthzExtensionOrBuilder.java | 585 ++ .../v1/CreateAuthzExtensionRequest.java | 1458 +++ .../CreateAuthzExtensionRequestOrBuilder.java | 181 + .../v1/CreateLbRouteExtensionRequest.java | 35 +- ...reateLbRouteExtensionRequestOrBuilder.java | 10 +- .../v1/CreateLbTrafficExtensionRequest.java | 35 +- ...ateLbTrafficExtensionRequestOrBuilder.java | 10 +- .../v1/CreateWasmPluginRequest.java | 1161 +++ .../v1/CreateWasmPluginRequestOrBuilder.java | 127 + .../v1/CreateWasmPluginVersionRequest.java | 1197 +++ ...eateWasmPluginVersionRequestOrBuilder.java | 131 + .../v1/DeleteAuthzExtensionRequest.java | 950 ++ .../DeleteAuthzExtensionRequestOrBuilder.java | 112 + .../v1/DeleteLbRouteExtensionRequest.java | 35 +- ...eleteLbRouteExtensionRequestOrBuilder.java | 10 +- .../v1/DeleteLbTrafficExtensionRequest.java | 35 +- ...eteLbTrafficExtensionRequestOrBuilder.java | 10 +- .../v1/DeleteWasmPluginRequest.java | 656 ++ .../v1/DeleteWasmPluginRequestOrBuilder.java | 58 + .../v1/DeleteWasmPluginVersionRequest.java | 675 ++ ...leteWasmPluginVersionRequestOrBuilder.java | 60 + .../cloud/networkservices/v1/DepProto.java | 386 +- .../v1/ExtensibilityProto.java | 485 + .../networkservices/v1/ExtensionChain.java | 1314 ++- .../v1/ExtensionChainOrBuilder.java | 15 +- .../v1/GetAuthzExtensionRequest.java | 667 ++ .../v1/GetAuthzExtensionRequestOrBuilder.java | 60 + .../v1/GetWasmPluginRequest.java | 826 ++ .../v1/GetWasmPluginRequestOrBuilder.java | 86 + .../v1/GetWasmPluginVersionRequest.java | 670 ++ .../GetWasmPluginVersionRequestOrBuilder.java | 60 + .../networkservices/v1/LbRouteExtension.java | 309 +- .../v1/LbRouteExtensionOrBuilder.java | 82 +- .../v1/LbTrafficExtension.java | 387 +- .../v1/LbTrafficExtensionOrBuilder.java | 105 +- .../v1/ListAuthzExtensionsRequest.java | 1337 +++ .../ListAuthzExtensionsRequestOrBuilder.java | 152 + .../v1/ListAuthzExtensionsResponse.java | 1463 +++ .../ListAuthzExtensionsResponseOrBuilder.java | 163 + .../v1/ListLbRouteExtensionsRequest.java | 28 +- ...ListLbRouteExtensionsRequestOrBuilder.java | 8 +- .../v1/ListLbTrafficExtensionsRequest.java | 28 +- ...stLbTrafficExtensionsRequestOrBuilder.java | 8 +- .../v1/ListWasmPluginVersionsRequest.java | 991 ++ ...istWasmPluginVersionsRequestOrBuilder.java | 108 + .../v1/ListWasmPluginVersionsResponse.java | 1542 +++ ...stWasmPluginVersionsResponseOrBuilder.java | 182 + .../v1/ListWasmPluginsRequest.java | 978 ++ .../v1/ListWasmPluginsRequestOrBuilder.java | 107 + .../v1/ListWasmPluginsResponse.java | 1491 +++ .../v1/ListWasmPluginsResponseOrBuilder.java | 176 + .../v1/LoadBalancingScheme.java | 8 +- .../v1/NetworkServicesOuterClass.java | 674 +- .../v1/UpdateAuthzExtensionRequest.java | 1388 +++ .../UpdateAuthzExtensionRequestOrBuilder.java | 173 + .../v1/UpdateLbRouteExtensionRequest.java | 59 +- ...pdateLbRouteExtensionRequestOrBuilder.java | 16 +- .../v1/UpdateLbTrafficExtensionRequest.java | 59 +- ...ateLbTrafficExtensionRequestOrBuilder.java | 16 +- .../v1/UpdateWasmPluginRequest.java | 1157 +++ .../v1/UpdateWasmPluginRequestOrBuilder.java | 136 + .../cloud/networkservices/v1/WasmPlugin.java | 8723 +++++++++++++++++ .../networkservices/v1/WasmPluginName.java | 223 + .../v1/WasmPluginOrBuilder.java | 550 ++ .../networkservices/v1/WasmPluginVersion.java | 2982 ++++++ .../v1/WasmPluginVersionName.java | 269 + .../v1/WasmPluginVersionOrBuilder.java | 421 + .../networkservices/v1/WasmPluginView.java | 185 + .../cloud/networkservices/v1/WireFormat.java | 164 + .../google/cloud/networkservices/v1/dep.proto | 505 +- .../networkservices/v1/extensibility.proto | 495 + .../networkservices/v1/network_services.proto | 110 + .../AsyncCreateAuthzExtension.java | 54 + .../AsyncCreateAuthzExtensionLRO.java | 54 + .../SyncCreateAuthzExtension.java | 49 + ...nsionLocationnameAuthzextensionString.java | 47 + ...hzExtensionStringAuthzextensionString.java | 47 + .../AsyncDeleteAuthzExtension.java | 52 + .../AsyncDeleteAuthzExtensionLRO.java | 53 + .../SyncDeleteAuthzExtension.java | 48 + ...eleteAuthzExtensionAuthzextensionname.java | 43 + .../SyncDeleteAuthzExtensionString.java | 43 + .../AsyncGetAuthzExtension.java | 51 + .../SyncGetAuthzExtension.java | 47 + ...ncGetAuthzExtensionAuthzextensionname.java | 43 + .../SyncGetAuthzExtensionString.java | 43 + .../AsyncListAuthzExtensions.java | 56 + .../AsyncListAuthzExtensionsPaged.java | 64 + .../SyncListAuthzExtensions.java | 52 + .../SyncListAuthzExtensionsLocationname.java | 44 + .../SyncListAuthzExtensionsString.java | 44 + .../AsyncUpdateAuthzExtension.java | 53 + .../AsyncUpdateAuthzExtensionLRO.java | 53 + .../SyncUpdateAuthzExtension.java | 48 + ...AuthzExtensionAuthzextensionFieldmask.java | 44 + .../AsyncCreateWasmPlugin.java | 53 + .../AsyncCreateWasmPluginLRO.java | 53 + .../SyncCreateWasmPlugin.java | 48 + ...asmPluginLocationnameWasmpluginString.java | 45 + ...reateWasmPluginStringWasmpluginString.java | 45 + .../AsyncCreateWasmPluginVersion.java | 53 + .../AsyncCreateWasmPluginVersionLRO.java | 53 + .../SyncCreateWasmPluginVersion.java | 49 + ...nVersionStringWasmpluginversionString.java | 47 + ...WasmpluginnameWasmpluginversionString.java | 48 + .../AsyncDeleteWasmPlugin.java | 50 + .../AsyncDeleteWasmPluginLRO.java | 51 + .../SyncDeleteWasmPlugin.java | 46 + .../SyncDeleteWasmPluginString.java | 42 + .../SyncDeleteWasmPluginWasmpluginname.java | 42 + .../AsyncDeleteWasmPluginVersion.java | 53 + .../AsyncDeleteWasmPluginVersionLRO.java | 54 + .../SyncDeleteWasmPluginVersion.java | 49 + .../SyncDeleteWasmPluginVersionString.java | 45 + ...asmPluginVersionWasmpluginversionname.java | 44 + .../getwasmplugin/AsyncGetWasmPlugin.java | 52 + .../getwasmplugin/SyncGetWasmPlugin.java | 48 + .../SyncGetWasmPluginString.java | 42 + .../SyncGetWasmPluginWasmpluginname.java | 42 + .../AsyncGetWasmPluginVersion.java | 53 + .../SyncGetWasmPluginVersion.java | 49 + .../SyncGetWasmPluginVersionString.java | 45 + ...asmPluginVersionWasmpluginversionname.java | 44 + .../listwasmplugins/AsyncListWasmPlugins.java | 54 + .../AsyncListWasmPluginsPaged.java | 62 + .../listwasmplugins/SyncListWasmPlugins.java | 50 + .../SyncListWasmPluginsLocationname.java | 44 + .../SyncListWasmPluginsString.java | 44 + .../AsyncListWasmPluginVersions.java | 54 + .../AsyncListWasmPluginVersionsPaged.java | 62 + .../SyncListWasmPluginVersions.java | 51 + .../SyncListWasmPluginVersionsString.java | 45 + ...cListWasmPluginVersionsWasmpluginname.java | 45 + .../AsyncUpdateWasmPlugin.java | 52 + .../AsyncUpdateWasmPluginLRO.java | 52 + .../SyncUpdateWasmPlugin.java | 47 + ...ncUpdateWasmPluginWasmpluginFieldmask.java | 44 + .../v3/TranslateDocumentRequest.java | 42 +- .../v3/TranslateDocumentRequestOrBuilder.java | 12 +- .../translate/v3/translation_service.proto | 6 +- .../v3beta1/TranslateTextGlossaryConfig.java | 2 - .../v3beta1/translation_service.proto | 1 - 354 files changed, 131050 insertions(+), 2006 deletions(-) create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClient.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceSettings.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceCallableFactory.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceStub.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceCallableFactory.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceStub.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStub.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStubSettings.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientHttpJsonTest.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientTest.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigService.java create mode 100644 java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigServiceImpl.java create mode 100644 java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceGrpc.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnector.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorName.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkload.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkloadOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeError.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeErrorOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponse.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponseOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkload.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkloadOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysis.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysisOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistry.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistryOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigName.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigProto.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponse.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponseOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponse.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponseOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponse.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponseOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfig.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfigOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/SystemProvider.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequest.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequestOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/User.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserName.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserOrBuilder.java create mode 100644 java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/insights_config.proto create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnectorLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorLocationnameAccountconnectorString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorStringAccountconnectorString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnectorLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelf.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelfLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelf.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUser.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUserLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUser.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserUsername.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/AsyncFetchAccessToken.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessToken.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/AsyncFetchSelf.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelf.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/AsyncGetAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectors.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectorsPaged.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectors.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsLocationname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsers.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsersPaged.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsers.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersAccountconnectorname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnectorLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnector.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnectorAccountconnectorFieldmask.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetEndpoint.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfigLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigLocationnameInsightsconfigString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigStringInsightsconfigString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfigLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigInsightsconfigname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/AsyncGetInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigInsightsconfigname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/AsyncGetLocation.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/SyncGetLocation.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigs.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigsPaged.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigs.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsLocationname.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsString.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocations.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/SyncListLocations.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfigLRO.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/SyncUpdateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/createinsightsconfig/SyncCreateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/getinsightsconfig/SyncGetInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/createinsightsconfig/SyncCreateInsightsConfig.java create mode 100644 java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/getinsightsconfig/SyncGetInsightsConfig.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionName.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensibilityProto.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponse.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponseOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponse.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponseOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponse.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponseOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequest.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequestOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginName.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionName.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginView.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java create mode 100644 java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtensionLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionLocationnameAuthzextensionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionStringAuthzextensionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtensionLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionAuthzextensionname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/AsyncGetAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionAuthzextensionname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensions.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensionsPaged.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensions.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsLocationname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtensionLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtension.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtensionAuthzextensionFieldmask.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPluginLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginLocationnameWasmpluginString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginStringWasmpluginString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersionLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionStringWasmpluginversionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPluginLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginWasmpluginname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersionLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionWasmpluginversionname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/AsyncGetWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginWasmpluginname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/AsyncGetWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersion.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionWasmpluginversionname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPlugins.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPluginsPaged.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPlugins.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsLocationname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersions.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersionsPaged.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersions.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsString.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsWasmpluginname.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPluginLRO.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPlugin.java create mode 100644 java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPluginWasmpluginFieldmask.java diff --git a/java-developerconnect/README.md b/java-developerconnect/README.md index 004ea48ef4cf..efff8764cdfb 100644 --- a/java-developerconnect/README.md +++ b/java-developerconnect/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-developerconnect - 0.20.0 + 0.23.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-developerconnect:0.20.0' +implementation 'com.google.cloud:google-cloud-developerconnect:0.23.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-developerconnect" % "0.20.0" +libraryDependencies += "com.google.cloud" % "google-cloud-developerconnect" % "0.23.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-developerconnect.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-developerconnect/0.20.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-developerconnect/0.23.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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectClient.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectClient.java index a2855d24fb07..9ec312cdba86 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectClient.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectClient.java @@ -348,6 +348,202 @@ * * * + *

ListAccountConnectors + *

Lists AccountConnectors in a given project and location. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

GetAccountConnector + *

Gets details of a single AccountConnector. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

CreateAccountConnector + *

Creates a new AccountConnector in a given project and location. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

UpdateAccountConnector + *

Updates the parameters of a single AccountConnector. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

DeleteAccountConnector + *

Deletes a single AccountConnector. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

FetchAccessToken + *

Fetches OAuth access token based on end user credentials. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

ListUsers + *

Lists Users in a given project, location, and account_connector. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

DeleteUser + *

Deletes a single User. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

FetchSelf + *

Fetch the User based on the user credentials. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * + *

DeleteSelf + *

Delete the User based on the user credentials. + * + *

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

+ * + *

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

+ * + *

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

+ * + * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -2671,7 +2867,7 @@ public final UnaryCallable fetchGitRe // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Lists AccountConnectors in a given project and location. * *

Sample code: * @@ -2682,14 +2878,78 @@ public final UnaryCallable fetchGitRe * // - 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (AccountConnector element : + * developerConnectClient.listAccountConnectors(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. Parent value for ListAccountConnectorsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountConnectorsPagedResponse listAccountConnectors(LocationName parent) { + ListAccountConnectorsRequest request = + ListAccountConnectorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccountConnectors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AccountConnectors 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AccountConnector element :
+   *       developerConnectClient.listAccountConnectors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListAccountConnectorsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountConnectorsPagedResponse listAccountConnectors(String parent) { + ListAccountConnectorsRequest request = + ListAccountConnectorsRequest.newBuilder().setParent(parent).build(); + return listAccountConnectors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AccountConnectors 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListAccountConnectorsRequest request =
+   *       ListAccountConnectorsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
    *           .build();
-   *   for (Location element : developerConnectClient.listLocations(request).iterateAll()) {
+   *   for (AccountConnector element :
+   *       developerConnectClient.listAccountConnectors(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -2698,13 +2958,14 @@ public final UnaryCallable fetchGitRe
    * @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 ListAccountConnectorsPagedResponse listAccountConnectors(
+      ListAccountConnectorsRequest request) {
+    return listAccountConnectorsPagedCallable().call(request);
   }
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists information about the supported locations for this service.
+   * Lists AccountConnectors in a given project and location.
    *
    * 

Sample code: * @@ -2715,30 +2976,31 @@ 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAccountConnectorsRequest request = + * ListAccountConnectorsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") * .build(); - * ApiFuture future = - * developerConnectClient.listLocationsPagedCallable().futureCall(request); + * ApiFuture future = + * developerConnectClient.listAccountConnectorsPagedCallable().futureCall(request); * // Do something. - * for (Location element : future.get().iterateAll()) { + * for (AccountConnector element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * }

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

Sample code: * @@ -2749,17 +3011,18 @@ 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAccountConnectorsRequest request = + * ListAccountConnectorsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") * .build(); * while (true) { - * ListLocationsResponse response = - * developerConnectClient.listLocationsCallable().call(request); - * for (Location element : response.getLocationsList()) { + * ListAccountConnectorsResponse response = + * developerConnectClient.listAccountConnectorsCallable().call(request); + * for (AccountConnector element : response.getAccountConnectorsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2772,13 +3035,14 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * } * } */ - public final UnaryCallable listLocationsCallable() { - return stub.listLocationsCallable(); + public final UnaryCallable + listAccountConnectorsCallable() { + return stub.listAccountConnectorsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of a single AccountConnector. * *

Sample code: * @@ -2789,21 +3053,26 @@ 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * Location response = developerConnectClient.getLocation(request); + * AccountConnectorName name = + * AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + * AccountConnector response = developerConnectClient.getAccountConnector(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. Name of the resource * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Location getLocation(GetLocationRequest request) { - return getLocationCallable().call(request); + public final AccountConnector getAccountConnector(AccountConnectorName name) { + GetAccountConnectorRequest request = + GetAccountConnectorRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAccountConnector(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of a single AccountConnector. * *

Sample code: * @@ -2814,39 +3083,1448 @@ 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * ApiFuture future = developerConnectClient.getLocationCallable().futureCall(request); - * // Do something. - * Location response = future.get(); + * String name = + * AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + * AccountConnector response = developerConnectClient.getAccountConnector(name); * } * } + * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - 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(); + public final AccountConnector getAccountConnector(String name) { + GetAccountConnectorRequest request = + GetAccountConnectorRequest.newBuilder().setName(name).build(); + return getAccountConnector(request); } - @Override - public void shutdownNow() { + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   GetAccountConnectorRequest request =
+   *       GetAccountConnectorRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   AccountConnector response = developerConnectClient.getAccountConnector(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 AccountConnector getAccountConnector(GetAccountConnectorRequest request) { + return getAccountConnectorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   GetAccountConnectorRequest request =
+   *       GetAccountConnectorRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.getAccountConnectorCallable().futureCall(request);
+   *   // Do something.
+   *   AccountConnector response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getAccountConnectorCallable() { + return stub.getAccountConnectorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AccountConnector 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AccountConnector accountConnector = AccountConnector.newBuilder().build();
+   *   String accountConnectorId = "accountConnectorId-605811237";
+   *   AccountConnector response =
+   *       developerConnectClient
+   *           .createAccountConnectorAsync(parent, accountConnector, accountConnectorId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location resource name as the account_connector’s parent. + * @param accountConnector Required. The AccountConnector to create. + * @param accountConnectorId Required. The ID to use for the AccountConnector, which will become + * the final component of the AccountConnector's resource name. Its format should adhere to + * https://google.aip.dev/122#resource-id-segments Names must be unique per-project + * per-location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAccountConnectorAsync( + LocationName parent, AccountConnector accountConnector, String accountConnectorId) { + CreateAccountConnectorRequest request = + CreateAccountConnectorRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAccountConnector(accountConnector) + .setAccountConnectorId(accountConnectorId) + .build(); + return createAccountConnectorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AccountConnector 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AccountConnector accountConnector = AccountConnector.newBuilder().build();
+   *   String accountConnectorId = "accountConnectorId-605811237";
+   *   AccountConnector response =
+   *       developerConnectClient
+   *           .createAccountConnectorAsync(parent, accountConnector, accountConnectorId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Location resource name as the account_connector’s parent. + * @param accountConnector Required. The AccountConnector to create. + * @param accountConnectorId Required. The ID to use for the AccountConnector, which will become + * the final component of the AccountConnector's resource name. Its format should adhere to + * https://google.aip.dev/122#resource-id-segments Names must be unique per-project + * per-location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAccountConnectorAsync( + String parent, AccountConnector accountConnector, String accountConnectorId) { + CreateAccountConnectorRequest request = + CreateAccountConnectorRequest.newBuilder() + .setParent(parent) + .setAccountConnector(accountConnector) + .setAccountConnectorId(accountConnectorId) + .build(); + return createAccountConnectorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AccountConnector 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   CreateAccountConnectorRequest request =
+   *       CreateAccountConnectorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAccountConnectorId("accountConnectorId-605811237")
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AccountConnector response = developerConnectClient.createAccountConnectorAsync(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 createAccountConnectorAsync( + CreateAccountConnectorRequest request) { + return createAccountConnectorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AccountConnector 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   CreateAccountConnectorRequest request =
+   *       CreateAccountConnectorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAccountConnectorId("accountConnectorId-605811237")
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       developerConnectClient.createAccountConnectorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AccountConnector response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAccountConnectorOperationCallable() { + return stub.createAccountConnectorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AccountConnector 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   CreateAccountConnectorRequest request =
+   *       CreateAccountConnectorRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAccountConnectorId("accountConnectorId-605811237")
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.createAccountConnectorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAccountConnectorCallable() { + return stub.createAccountConnectorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnector accountConnector = AccountConnector.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AccountConnector response =
+   *       developerConnectClient.updateAccountConnectorAsync(accountConnector, updateMask).get();
+   * }
+   * }
+ * + * @param accountConnector Required. The AccountConnector to update. + * @param updateMask Optional. The list of fields to be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAccountConnectorAsync( + AccountConnector accountConnector, FieldMask updateMask) { + UpdateAccountConnectorRequest request = + UpdateAccountConnectorRequest.newBuilder() + .setAccountConnector(accountConnector) + .setUpdateMask(updateMask) + .build(); + return updateAccountConnectorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   UpdateAccountConnectorRequest request =
+   *       UpdateAccountConnectorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   AccountConnector response = developerConnectClient.updateAccountConnectorAsync(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 updateAccountConnectorAsync( + UpdateAccountConnectorRequest request) { + return updateAccountConnectorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   UpdateAccountConnectorRequest request =
+   *       UpdateAccountConnectorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       developerConnectClient.updateAccountConnectorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AccountConnector response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAccountConnectorOperationCallable() { + return stub.updateAccountConnectorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   UpdateAccountConnectorRequest request =
+   *       UpdateAccountConnectorRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAccountConnector(AccountConnector.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.updateAccountConnectorCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAccountConnectorCallable() { + return stub.updateAccountConnectorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnectorName name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
+   *   developerConnectClient.deleteAccountConnectorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAccountConnectorAsync( + AccountConnectorName name) { + DeleteAccountConnectorRequest request = + DeleteAccountConnectorRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAccountConnectorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
+   *   developerConnectClient.deleteAccountConnectorAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAccountConnectorAsync(String name) { + DeleteAccountConnectorRequest request = + DeleteAccountConnectorRequest.newBuilder().setName(name).build(); + return deleteAccountConnectorAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteAccountConnectorRequest request =
+   *       DeleteAccountConnectorRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .setForce(true)
+   *           .build();
+   *   developerConnectClient.deleteAccountConnectorAsync(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 deleteAccountConnectorAsync( + DeleteAccountConnectorRequest request) { + return deleteAccountConnectorOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteAccountConnectorRequest request =
+   *       DeleteAccountConnectorRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .setForce(true)
+   *           .build();
+   *   OperationFuture future =
+   *       developerConnectClient.deleteAccountConnectorOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAccountConnectorOperationCallable() { + return stub.deleteAccountConnectorOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AccountConnector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteAccountConnectorRequest request =
+   *       DeleteAccountConnectorRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.deleteAccountConnectorCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteAccountConnectorCallable() { + return stub.deleteAccountConnectorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches OAuth access token based on end user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnectorName accountConnector =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
+   *   FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector);
+   * }
+   * }
+ * + * @param accountConnector Required. The resource name of the AccountConnector in the format + * `projects/*/locations/*/accountConnectors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchAccessTokenResponse fetchAccessToken(AccountConnectorName accountConnector) { + FetchAccessTokenRequest request = + FetchAccessTokenRequest.newBuilder() + .setAccountConnector(accountConnector == null ? null : accountConnector.toString()) + .build(); + return fetchAccessToken(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches OAuth access token based on end user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String accountConnector =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
+   *   FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector);
+   * }
+   * }
+ * + * @param accountConnector Required. The resource name of the AccountConnector in the format + * `projects/*/locations/*/accountConnectors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final FetchAccessTokenResponse fetchAccessToken(String accountConnector) { + FetchAccessTokenRequest request = + FetchAccessTokenRequest.newBuilder().setAccountConnector(accountConnector).build(); + return fetchAccessToken(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches OAuth access token based on end user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   FetchAccessTokenRequest request =
+   *       FetchAccessTokenRequest.newBuilder()
+   *           .setAccountConnector(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(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 FetchAccessTokenResponse fetchAccessToken(FetchAccessTokenRequest request) { + return fetchAccessTokenCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches OAuth access token based on end user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   FetchAccessTokenRequest request =
+   *       FetchAccessTokenRequest.newBuilder()
+   *           .setAccountConnector(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.fetchAccessTokenCallable().futureCall(request);
+   *   // Do something.
+   *   FetchAccessTokenResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + fetchAccessTokenCallable() { + return stub.fetchAccessTokenCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project, location, and account_connector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnectorName parent =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
+   *   for (User element : developerConnectClient.listUsers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListUsersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUsersPagedResponse listUsers(AccountConnectorName parent) { + ListUsersRequest request = + ListUsersRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listUsers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project, location, and account_connector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String parent =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
+   *   for (User element : developerConnectClient.listUsers(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListUsersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUsersPagedResponse listUsers(String parent) { + ListUsersRequest request = ListUsersRequest.newBuilder().setParent(parent).build(); + return listUsers(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project, location, and account_connector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (User element : developerConnectClient.listUsers(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 ListUsersPagedResponse listUsers(ListUsersRequest request) { + return listUsersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project, location, and account_connector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = developerConnectClient.listUsersPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (User element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listUsersPagedCallable() { + return stub.listUsersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Users in a given project, location, and account_connector. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListUsersRequest request =
+   *       ListUsersRequest.newBuilder()
+   *           .setParent(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListUsersResponse response = developerConnectClient.listUsersCallable().call(request);
+   *     for (User element : response.getUsersList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listUsersCallable() { + return stub.listUsersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]");
+   *   developerConnectClient.deleteUserAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteUserAsync(UserName name) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String name =
+   *       UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString();
+   *   developerConnectClient.deleteUserAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteUserAsync(String name) { + DeleteUserRequest request = DeleteUserRequest.newBuilder().setName(name).build(); + return deleteUserAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(
+   *               UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   developerConnectClient.deleteUserAsync(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 deleteUserAsync( + DeleteUserRequest request) { + return deleteUserOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(
+   *               UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       developerConnectClient.deleteUserOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteUserOperationCallable() { + return stub.deleteUserOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single User. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteUserRequest request =
+   *       DeleteUserRequest.newBuilder()
+   *           .setName(
+   *               UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future = developerConnectClient.deleteUserCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteUserCallable() { + return stub.deleteUserCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnectorName name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
+   *   User response = developerConnectClient.fetchSelf(name);
+   * }
+   * }
+ * + * @param name Required. Name of the AccountConnector resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final User fetchSelf(AccountConnectorName name) { + FetchSelfRequest request = + FetchSelfRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return fetchSelf(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
+   *   User response = developerConnectClient.fetchSelf(name);
+   * }
+   * }
+ * + * @param name Required. Name of the AccountConnector resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final User fetchSelf(String name) { + FetchSelfRequest request = FetchSelfRequest.newBuilder().setName(name).build(); + return fetchSelf(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   FetchSelfRequest request =
+   *       FetchSelfRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   User response = developerConnectClient.fetchSelf(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 User fetchSelf(FetchSelfRequest request) { + return fetchSelfCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetch the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   FetchSelfRequest request =
+   *       FetchSelfRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = developerConnectClient.fetchSelfCallable().futureCall(request);
+   *   // Do something.
+   *   User response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable fetchSelfCallable() { + return stub.fetchSelfCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   AccountConnectorName name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]");
+   *   developerConnectClient.deleteSelfAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the AccountConnector resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSelfAsync( + AccountConnectorName name) { + DeleteSelfRequest request = + DeleteSelfRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteSelfAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   String name =
+   *       AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString();
+   *   developerConnectClient.deleteSelfAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Name of the AccountConnector resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteSelfAsync(String name) { + DeleteSelfRequest request = DeleteSelfRequest.newBuilder().setName(name).build(); + return deleteSelfAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteSelfRequest request =
+   *       DeleteSelfRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   developerConnectClient.deleteSelfAsync(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 deleteSelfAsync( + DeleteSelfRequest request) { + return deleteSelfOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteSelfRequest request =
+   *       DeleteSelfRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       developerConnectClient.deleteSelfOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteSelfOperationCallable() { + return stub.deleteSelfOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete the User based on the user credentials. + * + *

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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   DeleteSelfRequest request =
+   *       DeleteSelfRequest.newBuilder()
+   *           .setName(
+   *               AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = developerConnectClient.deleteSelfCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteSelfCallable() { + return stub.deleteSelfCallable(); + } + + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : developerConnectClient.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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       developerConnectClient.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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         developerConnectClient.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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = developerConnectClient.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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = developerConnectClient.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(); } @@ -3192,6 +4870,155 @@ protected FetchGitRefsFixedSizeCollection createCollection( } } + public static class ListAccountConnectorsPagedResponse + extends AbstractPagedListResponse< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + AccountConnector, + ListAccountConnectorsPage, + ListAccountConnectorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAccountConnectorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAccountConnectorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAccountConnectorsPagedResponse(ListAccountConnectorsPage page) { + super(page, ListAccountConnectorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAccountConnectorsPage + extends AbstractPage< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + AccountConnector, + ListAccountConnectorsPage> { + + private ListAccountConnectorsPage( + PageContext + context, + ListAccountConnectorsResponse response) { + super(context, response); + } + + private static ListAccountConnectorsPage createEmptyPage() { + return new ListAccountConnectorsPage(null, null); + } + + @Override + protected ListAccountConnectorsPage createPage( + PageContext + context, + ListAccountConnectorsResponse response) { + return new ListAccountConnectorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAccountConnectorsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + AccountConnector, + ListAccountConnectorsPage, + ListAccountConnectorsFixedSizeCollection> { + + private ListAccountConnectorsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAccountConnectorsFixedSizeCollection createEmptyCollection() { + return new ListAccountConnectorsFixedSizeCollection(null, 0); + } + + @Override + protected ListAccountConnectorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAccountConnectorsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListUsersPagedResponse + extends AbstractPagedListResponse< + ListUsersRequest, ListUsersResponse, User, ListUsersPage, ListUsersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListUsersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListUsersPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListUsersPagedResponse(ListUsersPage page) { + super(page, ListUsersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListUsersPage + extends AbstractPage { + + private ListUsersPage( + PageContext context, + ListUsersResponse response) { + super(context, response); + } + + private static ListUsersPage createEmptyPage() { + return new ListUsersPage(null, null); + } + + @Override + protected ListUsersPage createPage( + PageContext context, + ListUsersResponse response) { + return new ListUsersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListUsersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListUsersRequest, ListUsersResponse, User, ListUsersPage, ListUsersFixedSizeCollection> { + + private ListUsersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListUsersFixedSizeCollection createEmptyCollection() { + return new ListUsersFixedSizeCollection(null, 0); + } + + @Override + protected ListUsersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListUsersFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectSettings.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectSettings.java index da8bff25ba14..123d634bfde2 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectSettings.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectSettings.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -245,6 +247,99 @@ public UnaryCallSettings fetchRea return ((DeveloperConnectStubSettings) getStubSettings()).fetchGitRefsSettings(); } + /** Returns the object with the settings used for calls to listAccountConnectors. */ + public PagedCallSettings< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).listAccountConnectorsSettings(); + } + + /** Returns the object with the settings used for calls to getAccountConnector. */ + public UnaryCallSettings + getAccountConnectorSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).getAccountConnectorSettings(); + } + + /** Returns the object with the settings used for calls to createAccountConnector. */ + public UnaryCallSettings + createAccountConnectorSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).createAccountConnectorSettings(); + } + + /** Returns the object with the settings used for calls to createAccountConnector. */ + public OperationCallSettings + createAccountConnectorOperationSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()) + .createAccountConnectorOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAccountConnector. */ + public UnaryCallSettings + updateAccountConnectorSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).updateAccountConnectorSettings(); + } + + /** Returns the object with the settings used for calls to updateAccountConnector. */ + public OperationCallSettings + updateAccountConnectorOperationSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()) + .updateAccountConnectorOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAccountConnector. */ + public UnaryCallSettings + deleteAccountConnectorSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).deleteAccountConnectorSettings(); + } + + /** Returns the object with the settings used for calls to deleteAccountConnector. */ + public OperationCallSettings + deleteAccountConnectorOperationSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()) + .deleteAccountConnectorOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchAccessToken. */ + public UnaryCallSettings + fetchAccessTokenSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).fetchAccessTokenSettings(); + } + + /** Returns the object with the settings used for calls to listUsers. */ + public PagedCallSettings + listUsersSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).listUsersSettings(); + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public UnaryCallSettings deleteUserSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).deleteUserSettings(); + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public OperationCallSettings + deleteUserOperationSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).deleteUserOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchSelf. */ + public UnaryCallSettings fetchSelfSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).fetchSelfSettings(); + } + + /** Returns the object with the settings used for calls to deleteSelf. */ + public UnaryCallSettings deleteSelfSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).deleteSelfSettings(); + } + + /** Returns the object with the settings used for calls to deleteSelf. */ + public OperationCallSettings + deleteSelfOperationSettings() { + return ((DeveloperConnectStubSettings) getStubSettings()).deleteSelfOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -491,6 +586,98 @@ public UnaryCallSettings.Builder getConnection return getStubSettingsBuilder().fetchGitRefsSettings(); } + /** Returns the builder for the settings used for calls to listAccountConnectors. */ + public PagedCallSettings.Builder< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings() { + return getStubSettingsBuilder().listAccountConnectorsSettings(); + } + + /** Returns the builder for the settings used for calls to getAccountConnector. */ + public UnaryCallSettings.Builder + getAccountConnectorSettings() { + return getStubSettingsBuilder().getAccountConnectorSettings(); + } + + /** Returns the builder for the settings used for calls to createAccountConnector. */ + public UnaryCallSettings.Builder + createAccountConnectorSettings() { + return getStubSettingsBuilder().createAccountConnectorSettings(); + } + + /** Returns the builder for the settings used for calls to createAccountConnector. */ + public OperationCallSettings.Builder< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationSettings() { + return getStubSettingsBuilder().createAccountConnectorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAccountConnector. */ + public UnaryCallSettings.Builder + updateAccountConnectorSettings() { + return getStubSettingsBuilder().updateAccountConnectorSettings(); + } + + /** Returns the builder for the settings used for calls to updateAccountConnector. */ + public OperationCallSettings.Builder< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationSettings() { + return getStubSettingsBuilder().updateAccountConnectorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAccountConnector. */ + public UnaryCallSettings.Builder + deleteAccountConnectorSettings() { + return getStubSettingsBuilder().deleteAccountConnectorSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAccountConnector. */ + public OperationCallSettings.Builder + deleteAccountConnectorOperationSettings() { + return getStubSettingsBuilder().deleteAccountConnectorOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchAccessToken. */ + public UnaryCallSettings.Builder + fetchAccessTokenSettings() { + return getStubSettingsBuilder().fetchAccessTokenSettings(); + } + + /** Returns the builder for the settings used for calls to listUsers. */ + public PagedCallSettings.Builder + listUsersSettings() { + return getStubSettingsBuilder().listUsersSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public UnaryCallSettings.Builder deleteUserSettings() { + return getStubSettingsBuilder().deleteUserSettings(); + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public OperationCallSettings.Builder + deleteUserOperationSettings() { + return getStubSettingsBuilder().deleteUserOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchSelf. */ + public UnaryCallSettings.Builder fetchSelfSettings() { + return getStubSettingsBuilder().fetchSelfSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSelf. */ + public UnaryCallSettings.Builder deleteSelfSettings() { + return getStubSettingsBuilder().deleteSelfSettings(); + } + + /** Returns the builder for the settings used for calls to deleteSelf. */ + public OperationCallSettings.Builder + deleteSelfOperationSettings() { + return getStubSettingsBuilder().deleteSelfOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClient.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClient.java new file mode 100644 index 000000000000..a202bfd51ddc --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClient.java @@ -0,0 +1,1432 @@ +/* + * 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.developerconnect.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.developerconnect.v1.stub.InsightsConfigServiceStub; +import com.google.cloud.developerconnect.v1.stub.InsightsConfigServiceStubSettings; +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 com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Creates and manages InsightsConfigs. + * + *

The InsightsConfig resource is the core configuration object to capture events from your + * Software Development Lifecycle. It acts as the central hub for managing how Developer connect + * understands your application, its runtime environments, and the artifacts deployed within them. A + * user can create an InsightsConfig, list previously-requested InsightsConfigs or get + * InsightsConfigs by their ID to determine the status of the InsightsConfig. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+ *     InsightsConfigServiceClient.create()) {
+ *   InsightsConfigName name =
+ *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
+ *   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
+ * }
+ * }
+ * + *

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

ListInsightsConfigs

Lists InsightsConfigs in a given project and location.

+ *

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

+ *
    + *
  • listInsightsConfigs(ListInsightsConfigsRequest request) + *

+ *

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

+ *
    + *
  • listInsightsConfigs(LocationName parent) + *

  • listInsightsConfigs(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.

+ *
    + *
  • listInsightsConfigsPagedCallable() + *

  • listInsightsConfigsCallable() + *

+ *

CreateInsightsConfig

Creates a new InsightsConfig in a given project and location.

+ *

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

+ *
    + *
  • createInsightsConfigAsync(CreateInsightsConfigRequest request) + *

+ *

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

+ *
    + *
  • createInsightsConfigAsync(LocationName parent, InsightsConfig insightsConfig, String insightsConfigId) + *

  • createInsightsConfigAsync(String parent, InsightsConfig insightsConfig, String insightsConfigId) + *

+ *

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

+ *
    + *
  • createInsightsConfigOperationCallable() + *

  • createInsightsConfigCallable() + *

+ *

GetInsightsConfig

Gets details of a single Insight.

+ *

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

+ *
    + *
  • getInsightsConfig(GetInsightsConfigRequest request) + *

+ *

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

+ *
    + *
  • getInsightsConfig(InsightsConfigName name) + *

  • getInsightsConfig(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.

+ *
    + *
  • getInsightsConfigCallable() + *

+ *

UpdateInsightsConfig

Updates the parameters of a single InsightsConfig.

+ *

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

+ *
    + *
  • updateInsightsConfigAsync(UpdateInsightsConfigRequest request) + *

+ *

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

+ *
    + *
  • updateInsightsConfigOperationCallable() + *

  • updateInsightsConfigCallable() + *

+ *

DeleteInsightsConfig

Delete a single Insight.

+ *

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

+ *
    + *
  • deleteInsightsConfigAsync(DeleteInsightsConfigRequest request) + *

+ *

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

+ *
    + *
  • deleteInsightsConfigAsync(InsightsConfigName name) + *

  • deleteInsightsConfigAsync(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.

+ *
    + *
  • deleteInsightsConfigOperationCallable() + *

  • deleteInsightsConfigCallable() + *

+ *

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 InsightsConfigServiceSettings + * 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
+ * InsightsConfigServiceSettings insightsConfigServiceSettings =
+ *     InsightsConfigServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * InsightsConfigServiceClient insightsConfigServiceClient =
+ *     InsightsConfigServiceClient.create(insightsConfigServiceSettings);
+ * }
+ * + *

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
+ * InsightsConfigServiceSettings insightsConfigServiceSettings =
+ *     InsightsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * InsightsConfigServiceClient insightsConfigServiceClient =
+ *     InsightsConfigServiceClient.create(insightsConfigServiceSettings);
+ * }
+ * + *

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

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

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class InsightsConfigServiceClient implements BackgroundResource { + private final InsightsConfigServiceSettings settings; + private final InsightsConfigServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of InsightsConfigServiceClient with default settings. */ + public static final InsightsConfigServiceClient create() throws IOException { + return create(InsightsConfigServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of InsightsConfigServiceClient, 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 InsightsConfigServiceClient create(InsightsConfigServiceSettings settings) + throws IOException { + return new InsightsConfigServiceClient(settings); + } + + /** + * Constructs an instance of InsightsConfigServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(InsightsConfigServiceSettings). + */ + public static final InsightsConfigServiceClient create(InsightsConfigServiceStub stub) { + return new InsightsConfigServiceClient(stub); + } + + /** + * Constructs an instance of InsightsConfigServiceClient, 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 InsightsConfigServiceClient(InsightsConfigServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((InsightsConfigServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected InsightsConfigServiceClient(InsightsConfigServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final InsightsConfigServiceSettings getSettings() { + return settings; + } + + public InsightsConfigServiceStub 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 com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (InsightsConfig element :
+   *       insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInsightsConfigsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInsightsConfigsPagedResponse listInsightsConfigs(LocationName parent) { + ListInsightsConfigsRequest request = + ListInsightsConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInsightsConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (InsightsConfig element :
+   *       insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Parent value for ListInsightsConfigsRequest. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInsightsConfigsPagedResponse listInsightsConfigs(String parent) { + ListInsightsConfigsRequest request = + ListInsightsConfigsRequest.newBuilder().setParent(parent).build(); + return listInsightsConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListInsightsConfigsRequest request =
+   *       ListInsightsConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (InsightsConfig element :
+   *       insightsConfigServiceClient.listInsightsConfigs(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 ListInsightsConfigsPagedResponse listInsightsConfigs( + ListInsightsConfigsRequest request) { + return listInsightsConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListInsightsConfigsRequest request =
+   *       ListInsightsConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.listInsightsConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (InsightsConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInsightsConfigsPagedCallable() { + return stub.listInsightsConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InsightsConfigs 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListInsightsConfigsRequest request =
+   *       ListInsightsConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListInsightsConfigsResponse response =
+   *         insightsConfigServiceClient.listInsightsConfigsCallable().call(request);
+   *     for (InsightsConfig element : response.getInsightsConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listInsightsConfigsCallable() { + return stub.listInsightsConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
+   *   String insightsConfigId = "insightsConfigId774395128";
+   *   InsightsConfig response =
+   *       insightsConfigServiceClient
+   *           .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param insightsConfig Required. The resource being created. + * @param insightsConfigId Required. ID of the requesting InsightsConfig. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInsightsConfigAsync( + LocationName parent, InsightsConfig insightsConfig, String insightsConfigId) { + CreateInsightsConfigRequest request = + CreateInsightsConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setInsightsConfig(insightsConfig) + .setInsightsConfigId(insightsConfigId) + .build(); + return createInsightsConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   InsightsConfig insightsConfig = InsightsConfig.newBuilder().build();
+   *   String insightsConfigId = "insightsConfigId774395128";
+   *   InsightsConfig response =
+   *       insightsConfigServiceClient
+   *           .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. Value for parent. + * @param insightsConfig Required. The resource being created. + * @param insightsConfigId Required. ID of the requesting InsightsConfig. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createInsightsConfigAsync( + String parent, InsightsConfig insightsConfig, String insightsConfigId) { + CreateInsightsConfigRequest request = + CreateInsightsConfigRequest.newBuilder() + .setParent(parent) + .setInsightsConfig(insightsConfig) + .setInsightsConfigId(insightsConfigId) + .build(); + return createInsightsConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   CreateInsightsConfigRequest request =
+   *       CreateInsightsConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInsightsConfigId("insightsConfigId774395128")
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   InsightsConfig response =
+   *       insightsConfigServiceClient.createInsightsConfigAsync(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 createInsightsConfigAsync( + CreateInsightsConfigRequest request) { + return createInsightsConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   CreateInsightsConfigRequest request =
+   *       CreateInsightsConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInsightsConfigId("insightsConfigId774395128")
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       insightsConfigServiceClient.createInsightsConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InsightsConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createInsightsConfigOperationCallable() { + return stub.createInsightsConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InsightsConfig 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   CreateInsightsConfigRequest request =
+   *       CreateInsightsConfigRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setInsightsConfigId("insightsConfigId774395128")
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.createInsightsConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createInsightsConfigCallable() { + return stub.createInsightsConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   InsightsConfigName name =
+   *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
+   *   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InsightsConfig getInsightsConfig(InsightsConfigName name) { + GetInsightsConfigRequest request = + GetInsightsConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInsightsConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   String name =
+   *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
+   *   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of the resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InsightsConfig getInsightsConfig(String name) { + GetInsightsConfigRequest request = GetInsightsConfigRequest.newBuilder().setName(name).build(); + return getInsightsConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   GetInsightsConfigRequest request =
+   *       GetInsightsConfigRequest.newBuilder()
+   *           .setName(
+   *               InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
+   *           .build();
+   *   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(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 InsightsConfig getInsightsConfig(GetInsightsConfigRequest request) { + return getInsightsConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   GetInsightsConfigRequest request =
+   *       GetInsightsConfigRequest.newBuilder()
+   *           .setName(
+   *               InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.getInsightsConfigCallable().futureCall(request);
+   *   // Do something.
+   *   InsightsConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getInsightsConfigCallable() { + return stub.getInsightsConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single InsightsConfig. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   UpdateInsightsConfigRequest request =
+   *       UpdateInsightsConfigRequest.newBuilder()
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   InsightsConfig response =
+   *       insightsConfigServiceClient.updateInsightsConfigAsync(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 updateInsightsConfigAsync( + UpdateInsightsConfigRequest request) { + return updateInsightsConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single InsightsConfig. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   UpdateInsightsConfigRequest request =
+   *       UpdateInsightsConfigRequest.newBuilder()
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       insightsConfigServiceClient.updateInsightsConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   InsightsConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateInsightsConfigOperationCallable() { + return stub.updateInsightsConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single InsightsConfig. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   UpdateInsightsConfigRequest request =
+   *       UpdateInsightsConfigRequest.newBuilder()
+   *           .setInsightsConfig(InsightsConfig.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.updateInsightsConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateInsightsConfigCallable() { + return stub.updateInsightsConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   InsightsConfigName name =
+   *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
+   *   insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Value for parent. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInsightsConfigAsync( + InsightsConfigName name) { + DeleteInsightsConfigRequest request = + DeleteInsightsConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteInsightsConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   String name =
+   *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString();
+   *   insightsConfigServiceClient.deleteInsightsConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. Value for parent. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteInsightsConfigAsync(String name) { + DeleteInsightsConfigRequest request = + DeleteInsightsConfigRequest.newBuilder().setName(name).build(); + return deleteInsightsConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   DeleteInsightsConfigRequest request =
+   *       DeleteInsightsConfigRequest.newBuilder()
+   *           .setName(
+   *               InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   insightsConfigServiceClient.deleteInsightsConfigAsync(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 deleteInsightsConfigAsync( + DeleteInsightsConfigRequest request) { + return deleteInsightsConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   DeleteInsightsConfigRequest request =
+   *       DeleteInsightsConfigRequest.newBuilder()
+   *           .setName(
+   *               InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       insightsConfigServiceClient.deleteInsightsConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteInsightsConfigOperationCallable() { + return stub.deleteInsightsConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a single Insight. + * + *

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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   DeleteInsightsConfigRequest request =
+   *       DeleteInsightsConfigRequest.newBuilder()
+   *           .setName(
+   *               InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.deleteInsightsConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteInsightsConfigCallable() { + return stub.deleteInsightsConfigCallable(); + } + + // 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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : insightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         insightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = insightsConfigServiceClient.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 (InsightsConfigServiceClient insightsConfigServiceClient =
+   *     InsightsConfigServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       insightsConfigServiceClient.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 ListInsightsConfigsPagedResponse + extends AbstractPagedListResponse< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + InsightsConfig, + ListInsightsConfigsPage, + ListInsightsConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInsightsConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListInsightsConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListInsightsConfigsPagedResponse(ListInsightsConfigsPage page) { + super(page, ListInsightsConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInsightsConfigsPage + extends AbstractPage< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + InsightsConfig, + ListInsightsConfigsPage> { + + private ListInsightsConfigsPage( + PageContext + context, + ListInsightsConfigsResponse response) { + super(context, response); + } + + private static ListInsightsConfigsPage createEmptyPage() { + return new ListInsightsConfigsPage(null, null); + } + + @Override + protected ListInsightsConfigsPage createPage( + PageContext + context, + ListInsightsConfigsResponse response) { + return new ListInsightsConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInsightsConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + InsightsConfig, + ListInsightsConfigsPage, + ListInsightsConfigsFixedSizeCollection> { + + private ListInsightsConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInsightsConfigsFixedSizeCollection createEmptyCollection() { + return new ListInsightsConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListInsightsConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInsightsConfigsFixedSizeCollection(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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceSettings.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceSettings.java new file mode 100644 index 000000000000..521581380446 --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceSettings.java @@ -0,0 +1,369 @@ +/* + * 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.developerconnect.v1; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.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.developerconnect.v1.stub.InsightsConfigServiceStubSettings; +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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link InsightsConfigServiceClient}. + * + *

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

    + *
  • The default service address (developerconnect.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 getInsightsConfig: + * + *

{@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
+ * InsightsConfigServiceSettings.Builder insightsConfigServiceSettingsBuilder =
+ *     InsightsConfigServiceSettings.newBuilder();
+ * insightsConfigServiceSettingsBuilder
+ *     .getInsightsConfigSettings()
+ *     .setRetrySettings(
+ *         insightsConfigServiceSettingsBuilder
+ *             .getInsightsConfigSettings()
+ *             .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());
+ * InsightsConfigServiceSettings insightsConfigServiceSettings =
+ *     insightsConfigServiceSettingsBuilder.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 createInsightsConfig: + * + *

{@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
+ * InsightsConfigServiceSettings.Builder insightsConfigServiceSettingsBuilder =
+ *     InsightsConfigServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * insightsConfigServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InsightsConfigServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listInsightsConfigs. */ + public PagedCallSettings< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).listInsightsConfigsSettings(); + } + + /** Returns the object with the settings used for calls to createInsightsConfig. */ + public UnaryCallSettings createInsightsConfigSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).createInsightsConfigSettings(); + } + + /** Returns the object with the settings used for calls to createInsightsConfig. */ + public OperationCallSettings + createInsightsConfigOperationSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()) + .createInsightsConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to getInsightsConfig. */ + public UnaryCallSettings getInsightsConfigSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).getInsightsConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateInsightsConfig. */ + public UnaryCallSettings updateInsightsConfigSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).updateInsightsConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateInsightsConfig. */ + public OperationCallSettings + updateInsightsConfigOperationSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()) + .updateInsightsConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteInsightsConfig. */ + public UnaryCallSettings deleteInsightsConfigSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).deleteInsightsConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteInsightsConfig. */ + public OperationCallSettings + deleteInsightsConfigOperationSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()) + .deleteInsightsConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((InsightsConfigServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final InsightsConfigServiceSettings create(InsightsConfigServiceStubSettings stub) + throws IOException { + return new InsightsConfigServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return InsightsConfigServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return InsightsConfigServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return InsightsConfigServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected InsightsConfigServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for InsightsConfigServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(InsightsConfigServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(InsightsConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(InsightsConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(InsightsConfigServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(InsightsConfigServiceStubSettings.newHttpJsonBuilder()); + } + + public InsightsConfigServiceStubSettings.Builder getStubSettingsBuilder() { + return ((InsightsConfigServiceStubSettings.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 listInsightsConfigs. */ + public PagedCallSettings.Builder< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings() { + return getStubSettingsBuilder().listInsightsConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to createInsightsConfig. */ + public UnaryCallSettings.Builder + createInsightsConfigSettings() { + return getStubSettingsBuilder().createInsightsConfigSettings(); + } + + /** Returns the builder for the settings used for calls to createInsightsConfig. */ + public OperationCallSettings.Builder< + CreateInsightsConfigRequest, InsightsConfig, OperationMetadata> + createInsightsConfigOperationSettings() { + return getStubSettingsBuilder().createInsightsConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getInsightsConfig. */ + public UnaryCallSettings.Builder + getInsightsConfigSettings() { + return getStubSettingsBuilder().getInsightsConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateInsightsConfig. */ + public UnaryCallSettings.Builder + updateInsightsConfigSettings() { + return getStubSettingsBuilder().updateInsightsConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateInsightsConfig. */ + public OperationCallSettings.Builder< + UpdateInsightsConfigRequest, InsightsConfig, OperationMetadata> + updateInsightsConfigOperationSettings() { + return getStubSettingsBuilder().updateInsightsConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInsightsConfig. */ + public UnaryCallSettings.Builder + deleteInsightsConfigSettings() { + return getStubSettingsBuilder().deleteInsightsConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInsightsConfig. */ + public OperationCallSettings.Builder + deleteInsightsConfigOperationSettings() { + return getStubSettingsBuilder().deleteInsightsConfigOperationSettings(); + } + + /** 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 InsightsConfigServiceSettings build() throws IOException { + return new InsightsConfigServiceSettings(this); + } + } +} diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/gapic_metadata.json b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/gapic_metadata.json index 0f73e13c3f41..a44cd585bb43 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/gapic_metadata.json +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/gapic_metadata.json @@ -10,18 +10,33 @@ "grpc": { "libraryClient": "DeveloperConnectClient", "rpcs": { + "CreateAccountConnector": { + "methods": ["createAccountConnectorAsync", "createAccountConnectorAsync", "createAccountConnectorAsync", "createAccountConnectorOperationCallable", "createAccountConnectorCallable"] + }, "CreateConnection": { "methods": ["createConnectionAsync", "createConnectionAsync", "createConnectionAsync", "createConnectionOperationCallable", "createConnectionCallable"] }, "CreateGitRepositoryLink": { "methods": ["createGitRepositoryLinkAsync", "createGitRepositoryLinkAsync", "createGitRepositoryLinkAsync", "createGitRepositoryLinkOperationCallable", "createGitRepositoryLinkCallable"] }, + "DeleteAccountConnector": { + "methods": ["deleteAccountConnectorAsync", "deleteAccountConnectorAsync", "deleteAccountConnectorAsync", "deleteAccountConnectorOperationCallable", "deleteAccountConnectorCallable"] + }, "DeleteConnection": { "methods": ["deleteConnectionAsync", "deleteConnectionAsync", "deleteConnectionAsync", "deleteConnectionOperationCallable", "deleteConnectionCallable"] }, "DeleteGitRepositoryLink": { "methods": ["deleteGitRepositoryLinkAsync", "deleteGitRepositoryLinkAsync", "deleteGitRepositoryLinkAsync", "deleteGitRepositoryLinkOperationCallable", "deleteGitRepositoryLinkCallable"] }, + "DeleteSelf": { + "methods": ["deleteSelfAsync", "deleteSelfAsync", "deleteSelfAsync", "deleteSelfOperationCallable", "deleteSelfCallable"] + }, + "DeleteUser": { + "methods": ["deleteUserAsync", "deleteUserAsync", "deleteUserAsync", "deleteUserOperationCallable", "deleteUserCallable"] + }, + "FetchAccessToken": { + "methods": ["fetchAccessToken", "fetchAccessToken", "fetchAccessToken", "fetchAccessTokenCallable"] + }, "FetchGitHubInstallations": { "methods": ["fetchGitHubInstallations", "fetchGitHubInstallations", "fetchGitHubInstallations", "fetchGitHubInstallationsCallable"] }, @@ -37,6 +52,12 @@ "FetchReadWriteToken": { "methods": ["fetchReadWriteToken", "fetchReadWriteToken", "fetchReadWriteToken", "fetchReadWriteTokenCallable"] }, + "FetchSelf": { + "methods": ["fetchSelf", "fetchSelf", "fetchSelf", "fetchSelfCallable"] + }, + "GetAccountConnector": { + "methods": ["getAccountConnector", "getAccountConnector", "getAccountConnector", "getAccountConnectorCallable"] + }, "GetConnection": { "methods": ["getConnection", "getConnection", "getConnection", "getConnectionCallable"] }, @@ -46,6 +67,9 @@ "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "ListAccountConnectors": { + "methods": ["listAccountConnectors", "listAccountConnectors", "listAccountConnectors", "listAccountConnectorsPagedCallable", "listAccountConnectorsCallable"] + }, "ListConnections": { "methods": ["listConnections", "listConnections", "listConnections", "listConnectionsPagedCallable", "listConnectionsCallable"] }, @@ -55,12 +79,48 @@ "ListLocations": { "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] }, + "ListUsers": { + "methods": ["listUsers", "listUsers", "listUsers", "listUsersPagedCallable", "listUsersCallable"] + }, + "UpdateAccountConnector": { + "methods": ["updateAccountConnectorAsync", "updateAccountConnectorAsync", "updateAccountConnectorOperationCallable", "updateAccountConnectorCallable"] + }, "UpdateConnection": { "methods": ["updateConnectionAsync", "updateConnectionAsync", "updateConnectionOperationCallable", "updateConnectionCallable"] } } } } + }, + "InsightsConfigService": { + "clients": { + "grpc": { + "libraryClient": "InsightsConfigServiceClient", + "rpcs": { + "CreateInsightsConfig": { + "methods": ["createInsightsConfigAsync", "createInsightsConfigAsync", "createInsightsConfigAsync", "createInsightsConfigOperationCallable", "createInsightsConfigCallable"] + }, + "DeleteInsightsConfig": { + "methods": ["deleteInsightsConfigAsync", "deleteInsightsConfigAsync", "deleteInsightsConfigAsync", "deleteInsightsConfigOperationCallable", "deleteInsightsConfigCallable"] + }, + "GetInsightsConfig": { + "methods": ["getInsightsConfig", "getInsightsConfig", "getInsightsConfig", "getInsightsConfigCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListInsightsConfigs": { + "methods": ["listInsightsConfigs", "listInsightsConfigs", "listInsightsConfigs", "listInsightsConfigsPagedCallable", "listInsightsConfigsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateInsightsConfig": { + "methods": ["updateInsightsConfigAsync", "updateInsightsConfigOperationCallable", "updateInsightsConfigCallable"] + } + } + } + } } } } \ No newline at end of file diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/package-info.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/package-info.java index 388a3d5826e5..6bef316e9000 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/package-info.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/package-info.java @@ -36,6 +36,32 @@ * Connection response = developerConnectClient.getConnection(name); * } * } + * + *

======================= InsightsConfigServiceClient ======================= + * + *

Service Description: Creates and manages InsightsConfigs. + * + *

The InsightsConfig resource is the core configuration object to capture events from your + * Software Development Lifecycle. It acts as the central hub for managing how Developer connect + * understands your application, its runtime environments, and the artifacts deployed within them. A + * user can create an InsightsConfig, list previously-requested InsightsConfigs or get + * InsightsConfigs by their ID to determine the status of the InsightsConfig. + * + *

Sample for InsightsConfigServiceClient: + * + *

{@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 (InsightsConfigServiceClient insightsConfigServiceClient =
+ *     InsightsConfigServiceClient.create()) {
+ *   InsightsConfigName name =
+ *       InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]");
+ *   InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.developerconnect.v1; diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStub.java index 744ea741ed4a..d18bb704ce84 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStub.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStub.java @@ -18,18 +18,27 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.developerconnect.v1.AccountConnector; import com.google.cloud.developerconnect.v1.Connection; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.CreateConnectionRequest; import com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; import com.google.cloud.developerconnect.v1.DeleteConnectionRequest; import com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse; import com.google.cloud.developerconnect.v1.FetchGitRefsRequest; @@ -40,15 +49,23 @@ import com.google.cloud.developerconnect.v1.FetchReadTokenResponse; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; import com.google.cloud.developerconnect.v1.GetConnectionRequest; import com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest; import com.google.cloud.developerconnect.v1.GitRepositoryLink; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse; import com.google.cloud.developerconnect.v1.ListConnectionsRequest; import com.google.cloud.developerconnect.v1.ListConnectionsResponse; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.ListUsersResponse; import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.UpdateConnectionRequest; +import com.google.cloud.developerconnect.v1.User; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -188,6 +205,86 @@ public UnaryCallable fetchGitRefsCall throw new UnsupportedOperationException("Not implemented: fetchGitRefsCallable()"); } + public UnaryCallable + listAccountConnectorsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAccountConnectorsPagedCallable()"); + } + + public UnaryCallable + listAccountConnectorsCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountConnectorsCallable()"); + } + + public UnaryCallable getAccountConnectorCallable() { + throw new UnsupportedOperationException("Not implemented: getAccountConnectorCallable()"); + } + + public OperationCallable + createAccountConnectorOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAccountConnectorOperationCallable()"); + } + + public UnaryCallable createAccountConnectorCallable() { + throw new UnsupportedOperationException("Not implemented: createAccountConnectorCallable()"); + } + + public OperationCallable + updateAccountConnectorOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAccountConnectorOperationCallable()"); + } + + public UnaryCallable updateAccountConnectorCallable() { + throw new UnsupportedOperationException("Not implemented: updateAccountConnectorCallable()"); + } + + public OperationCallable + deleteAccountConnectorOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAccountConnectorOperationCallable()"); + } + + public UnaryCallable deleteAccountConnectorCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAccountConnectorCallable()"); + } + + public UnaryCallable + fetchAccessTokenCallable() { + throw new UnsupportedOperationException("Not implemented: fetchAccessTokenCallable()"); + } + + public UnaryCallable listUsersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listUsersPagedCallable()"); + } + + public UnaryCallable listUsersCallable() { + throw new UnsupportedOperationException("Not implemented: listUsersCallable()"); + } + + public OperationCallable + deleteUserOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserOperationCallable()"); + } + + public UnaryCallable deleteUserCallable() { + throw new UnsupportedOperationException("Not implemented: deleteUserCallable()"); + } + + public UnaryCallable fetchSelfCallable() { + throw new UnsupportedOperationException("Not implemented: fetchSelfCallable()"); + } + + public OperationCallable + deleteSelfOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSelfOperationCallable()"); + } + + public UnaryCallable deleteSelfCallable() { + throw new UnsupportedOperationException("Not implemented: deleteSelfCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStubSettings.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStubSettings.java index c9c35d0f5322..b57b7153be88 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStubSettings.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/DeveloperConnectStubSettings.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -52,11 +54,18 @@ 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.developerconnect.v1.AccountConnector; import com.google.cloud.developerconnect.v1.Connection; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.CreateConnectionRequest; import com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; import com.google.cloud.developerconnect.v1.DeleteConnectionRequest; import com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse; import com.google.cloud.developerconnect.v1.FetchGitRefsRequest; @@ -67,16 +76,24 @@ import com.google.cloud.developerconnect.v1.FetchReadTokenResponse; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; import com.google.cloud.developerconnect.v1.GetConnectionRequest; import com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest; import com.google.cloud.developerconnect.v1.GitRepositoryLink; import com.google.cloud.developerconnect.v1.LinkableGitRepository; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse; import com.google.cloud.developerconnect.v1.ListConnectionsRequest; import com.google.cloud.developerconnect.v1.ListConnectionsResponse; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.ListUsersResponse; import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.UpdateConnectionRequest; +import com.google.cloud.developerconnect.v1.User; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -218,6 +235,38 @@ public class DeveloperConnectStubSettings extends StubSettings fetchGitRefsSettings; + private final PagedCallSettings< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings; + private final UnaryCallSettings + getAccountConnectorSettings; + private final UnaryCallSettings + createAccountConnectorSettings; + private final OperationCallSettings< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationSettings; + private final UnaryCallSettings + updateAccountConnectorSettings; + private final OperationCallSettings< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationSettings; + private final UnaryCallSettings + deleteAccountConnectorSettings; + private final OperationCallSettings + deleteAccountConnectorOperationSettings; + private final UnaryCallSettings + fetchAccessTokenSettings; + private final PagedCallSettings + listUsersSettings; + private final UnaryCallSettings deleteUserSettings; + private final OperationCallSettings + deleteUserOperationSettings; + private final UnaryCallSettings fetchSelfSettings; + private final UnaryCallSettings deleteSelfSettings; + private final OperationCallSettings + deleteSelfOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -382,6 +431,79 @@ public Iterable extractResources(FetchGitRefsResponse payload) { } }; + private static final PagedListDescriptor< + ListAccountConnectorsRequest, ListAccountConnectorsResponse, AccountConnector> + LIST_ACCOUNT_CONNECTORS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAccountConnectorsRequest, ListAccountConnectorsResponse, AccountConnector>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAccountConnectorsRequest injectToken( + ListAccountConnectorsRequest payload, String token) { + return ListAccountConnectorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAccountConnectorsRequest injectPageSize( + ListAccountConnectorsRequest payload, int pageSize) { + return ListAccountConnectorsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAccountConnectorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAccountConnectorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAccountConnectorsResponse payload) { + return payload.getAccountConnectorsList(); + } + }; + + private static final PagedListDescriptor + LIST_USERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListUsersRequest injectToken(ListUsersRequest payload, String token) { + return ListUsersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListUsersRequest injectPageSize(ListUsersRequest payload, int pageSize) { + return ListUsersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListUsersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListUsersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListUsersResponse payload) { + return payload.getUsersList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -509,6 +631,47 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + LIST_ACCOUNT_CONNECTORS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountConnectorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAccountConnectorsRequest, ListAccountConnectorsResponse, AccountConnector> + pageContext = + PageContext.create( + callable, LIST_ACCOUNT_CONNECTORS_PAGE_STR_DESC, request, context); + return ListAccountConnectorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse> + LIST_USERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUsersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_USERS_PAGE_STR_DESC, request, context); + return ListUsersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -642,6 +805,96 @@ public UnaryCallSettings fetchRea return fetchGitRefsSettings; } + /** Returns the object with the settings used for calls to listAccountConnectors. */ + public PagedCallSettings< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings() { + return listAccountConnectorsSettings; + } + + /** Returns the object with the settings used for calls to getAccountConnector. */ + public UnaryCallSettings + getAccountConnectorSettings() { + return getAccountConnectorSettings; + } + + /** Returns the object with the settings used for calls to createAccountConnector. */ + public UnaryCallSettings + createAccountConnectorSettings() { + return createAccountConnectorSettings; + } + + /** Returns the object with the settings used for calls to createAccountConnector. */ + public OperationCallSettings + createAccountConnectorOperationSettings() { + return createAccountConnectorOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAccountConnector. */ + public UnaryCallSettings + updateAccountConnectorSettings() { + return updateAccountConnectorSettings; + } + + /** Returns the object with the settings used for calls to updateAccountConnector. */ + public OperationCallSettings + updateAccountConnectorOperationSettings() { + return updateAccountConnectorOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAccountConnector. */ + public UnaryCallSettings + deleteAccountConnectorSettings() { + return deleteAccountConnectorSettings; + } + + /** Returns the object with the settings used for calls to deleteAccountConnector. */ + public OperationCallSettings + deleteAccountConnectorOperationSettings() { + return deleteAccountConnectorOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchAccessToken. */ + public UnaryCallSettings + fetchAccessTokenSettings() { + return fetchAccessTokenSettings; + } + + /** Returns the object with the settings used for calls to listUsers. */ + public PagedCallSettings + listUsersSettings() { + return listUsersSettings; + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public UnaryCallSettings deleteUserSettings() { + return deleteUserSettings; + } + + /** Returns the object with the settings used for calls to deleteUser. */ + public OperationCallSettings + deleteUserOperationSettings() { + return deleteUserOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchSelf. */ + public UnaryCallSettings fetchSelfSettings() { + return fetchSelfSettings; + } + + /** Returns the object with the settings used for calls to deleteSelf. */ + public UnaryCallSettings deleteSelfSettings() { + return deleteSelfSettings; + } + + /** Returns the object with the settings used for calls to deleteSelf. */ + public OperationCallSettings + deleteSelfOperationSettings() { + return deleteSelfOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -786,6 +1039,24 @@ protected DeveloperConnectStubSettings(Builder settingsBuilder) throws IOExcepti settingsBuilder.fetchLinkableGitRepositoriesSettings().build(); fetchGitHubInstallationsSettings = settingsBuilder.fetchGitHubInstallationsSettings().build(); fetchGitRefsSettings = settingsBuilder.fetchGitRefsSettings().build(); + listAccountConnectorsSettings = settingsBuilder.listAccountConnectorsSettings().build(); + getAccountConnectorSettings = settingsBuilder.getAccountConnectorSettings().build(); + createAccountConnectorSettings = settingsBuilder.createAccountConnectorSettings().build(); + createAccountConnectorOperationSettings = + settingsBuilder.createAccountConnectorOperationSettings().build(); + updateAccountConnectorSettings = settingsBuilder.updateAccountConnectorSettings().build(); + updateAccountConnectorOperationSettings = + settingsBuilder.updateAccountConnectorOperationSettings().build(); + deleteAccountConnectorSettings = settingsBuilder.deleteAccountConnectorSettings().build(); + deleteAccountConnectorOperationSettings = + settingsBuilder.deleteAccountConnectorOperationSettings().build(); + fetchAccessTokenSettings = settingsBuilder.fetchAccessTokenSettings().build(); + listUsersSettings = settingsBuilder.listUsersSettings().build(); + deleteUserSettings = settingsBuilder.deleteUserSettings().build(); + deleteUserOperationSettings = settingsBuilder.deleteUserOperationSettings().build(); + fetchSelfSettings = settingsBuilder.fetchSelfSettings().build(); + deleteSelfSettings = settingsBuilder.deleteSelfSettings().build(); + deleteSelfOperationSettings = settingsBuilder.deleteSelfOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -843,6 +1114,40 @@ public static class Builder extends StubSettings.Builder fetchGitRefsSettings; + private final PagedCallSettings.Builder< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings; + private final UnaryCallSettings.Builder + getAccountConnectorSettings; + private final UnaryCallSettings.Builder + createAccountConnectorSettings; + private final OperationCallSettings.Builder< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationSettings; + private final UnaryCallSettings.Builder + updateAccountConnectorSettings; + private final OperationCallSettings.Builder< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationSettings; + private final UnaryCallSettings.Builder + deleteAccountConnectorSettings; + private final OperationCallSettings.Builder< + DeleteAccountConnectorRequest, Empty, OperationMetadata> + deleteAccountConnectorOperationSettings; + private final UnaryCallSettings.Builder + fetchAccessTokenSettings; + private final PagedCallSettings.Builder< + ListUsersRequest, ListUsersResponse, ListUsersPagedResponse> + listUsersSettings; + private final UnaryCallSettings.Builder deleteUserSettings; + private final OperationCallSettings.Builder + deleteUserOperationSettings; + private final UnaryCallSettings.Builder fetchSelfSettings; + private final UnaryCallSettings.Builder deleteSelfSettings; + private final OperationCallSettings.Builder + deleteSelfOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -909,6 +1214,22 @@ protected Builder(ClientContext clientContext) { PagedCallSettings.newBuilder(FETCH_LINKABLE_GIT_REPOSITORIES_PAGE_STR_FACT); fetchGitHubInstallationsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); fetchGitRefsSettings = PagedCallSettings.newBuilder(FETCH_GIT_REFS_PAGE_STR_FACT); + listAccountConnectorsSettings = + PagedCallSettings.newBuilder(LIST_ACCOUNT_CONNECTORS_PAGE_STR_FACT); + getAccountConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAccountConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAccountConnectorOperationSettings = OperationCallSettings.newBuilder(); + updateAccountConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAccountConnectorOperationSettings = OperationCallSettings.newBuilder(); + deleteAccountConnectorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAccountConnectorOperationSettings = OperationCallSettings.newBuilder(); + fetchAccessTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listUsersSettings = PagedCallSettings.newBuilder(LIST_USERS_PAGE_STR_FACT); + deleteUserSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteUserOperationSettings = OperationCallSettings.newBuilder(); + fetchSelfSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSelfSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteSelfOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -928,6 +1249,16 @@ protected Builder(ClientContext clientContext) { fetchLinkableGitRepositoriesSettings, fetchGitHubInstallationsSettings, fetchGitRefsSettings, + listAccountConnectorsSettings, + getAccountConnectorSettings, + createAccountConnectorSettings, + updateAccountConnectorSettings, + deleteAccountConnectorSettings, + fetchAccessTokenSettings, + listUsersSettings, + deleteUserSettings, + fetchSelfSettings, + deleteSelfSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -958,6 +1289,24 @@ protected Builder(DeveloperConnectStubSettings settings) { settings.fetchLinkableGitRepositoriesSettings.toBuilder(); fetchGitHubInstallationsSettings = settings.fetchGitHubInstallationsSettings.toBuilder(); fetchGitRefsSettings = settings.fetchGitRefsSettings.toBuilder(); + listAccountConnectorsSettings = settings.listAccountConnectorsSettings.toBuilder(); + getAccountConnectorSettings = settings.getAccountConnectorSettings.toBuilder(); + createAccountConnectorSettings = settings.createAccountConnectorSettings.toBuilder(); + createAccountConnectorOperationSettings = + settings.createAccountConnectorOperationSettings.toBuilder(); + updateAccountConnectorSettings = settings.updateAccountConnectorSettings.toBuilder(); + updateAccountConnectorOperationSettings = + settings.updateAccountConnectorOperationSettings.toBuilder(); + deleteAccountConnectorSettings = settings.deleteAccountConnectorSettings.toBuilder(); + deleteAccountConnectorOperationSettings = + settings.deleteAccountConnectorOperationSettings.toBuilder(); + fetchAccessTokenSettings = settings.fetchAccessTokenSettings.toBuilder(); + listUsersSettings = settings.listUsersSettings.toBuilder(); + deleteUserSettings = settings.deleteUserSettings.toBuilder(); + deleteUserOperationSettings = settings.deleteUserOperationSettings.toBuilder(); + fetchSelfSettings = settings.fetchSelfSettings.toBuilder(); + deleteSelfSettings = settings.deleteSelfSettings.toBuilder(); + deleteSelfOperationSettings = settings.deleteSelfOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -977,6 +1326,16 @@ protected Builder(DeveloperConnectStubSettings settings) { fetchLinkableGitRepositoriesSettings, fetchGitHubInstallationsSettings, fetchGitRefsSettings, + listAccountConnectorsSettings, + getAccountConnectorSettings, + createAccountConnectorSettings, + updateAccountConnectorSettings, + deleteAccountConnectorSettings, + fetchAccessTokenSettings, + listUsersSettings, + deleteUserSettings, + fetchSelfSettings, + deleteSelfSettings, listLocationsSettings, getLocationSettings); } @@ -1076,6 +1435,56 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .listAccountConnectorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getAccountConnectorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createAccountConnectorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateAccountConnectorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteAccountConnectorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchAccessTokenSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listUsersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteUserSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchSelfSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteSelfSettings() + .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")) @@ -1206,6 +1615,124 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .createAccountConnectorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AccountConnector.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 + .updateAccountConnectorOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AccountConnector.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 + .deleteAccountConnectorOperationSettings() + .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 + .deleteUserOperationSettings() + .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 + .deleteSelfOperationSettings() + .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; } @@ -1347,6 +1874,98 @@ public UnaryCallSettings.Builder getConnection return fetchGitRefsSettings; } + /** Returns the builder for the settings used for calls to listAccountConnectors. */ + public PagedCallSettings.Builder< + ListAccountConnectorsRequest, + ListAccountConnectorsResponse, + ListAccountConnectorsPagedResponse> + listAccountConnectorsSettings() { + return listAccountConnectorsSettings; + } + + /** Returns the builder for the settings used for calls to getAccountConnector. */ + public UnaryCallSettings.Builder + getAccountConnectorSettings() { + return getAccountConnectorSettings; + } + + /** Returns the builder for the settings used for calls to createAccountConnector. */ + public UnaryCallSettings.Builder + createAccountConnectorSettings() { + return createAccountConnectorSettings; + } + + /** Returns the builder for the settings used for calls to createAccountConnector. */ + public OperationCallSettings.Builder< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationSettings() { + return createAccountConnectorOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAccountConnector. */ + public UnaryCallSettings.Builder + updateAccountConnectorSettings() { + return updateAccountConnectorSettings; + } + + /** Returns the builder for the settings used for calls to updateAccountConnector. */ + public OperationCallSettings.Builder< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationSettings() { + return updateAccountConnectorOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAccountConnector. */ + public UnaryCallSettings.Builder + deleteAccountConnectorSettings() { + return deleteAccountConnectorSettings; + } + + /** Returns the builder for the settings used for calls to deleteAccountConnector. */ + public OperationCallSettings.Builder + deleteAccountConnectorOperationSettings() { + return deleteAccountConnectorOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchAccessToken. */ + public UnaryCallSettings.Builder + fetchAccessTokenSettings() { + return fetchAccessTokenSettings; + } + + /** Returns the builder for the settings used for calls to listUsers. */ + public PagedCallSettings.Builder + listUsersSettings() { + return listUsersSettings; + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public UnaryCallSettings.Builder deleteUserSettings() { + return deleteUserSettings; + } + + /** Returns the builder for the settings used for calls to deleteUser. */ + public OperationCallSettings.Builder + deleteUserOperationSettings() { + return deleteUserOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchSelf. */ + public UnaryCallSettings.Builder fetchSelfSettings() { + return fetchSelfSettings; + } + + /** Returns the builder for the settings used for calls to deleteSelf. */ + public UnaryCallSettings.Builder deleteSelfSettings() { + return deleteSelfSettings; + } + + /** Returns the builder for the settings used for calls to deleteSelf. */ + public OperationCallSettings.Builder + deleteSelfOperationSettings() { + return deleteSelfOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcDeveloperConnectStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcDeveloperConnectStub.java index 46d9e33cd109..82c47c31d939 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcDeveloperConnectStub.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcDeveloperConnectStub.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -30,11 +32,18 @@ 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.developerconnect.v1.AccountConnector; import com.google.cloud.developerconnect.v1.Connection; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.CreateConnectionRequest; import com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; import com.google.cloud.developerconnect.v1.DeleteConnectionRequest; import com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse; import com.google.cloud.developerconnect.v1.FetchGitRefsRequest; @@ -45,15 +54,23 @@ import com.google.cloud.developerconnect.v1.FetchReadTokenResponse; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; import com.google.cloud.developerconnect.v1.GetConnectionRequest; import com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest; import com.google.cloud.developerconnect.v1.GitRepositoryLink; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse; import com.google.cloud.developerconnect.v1.ListConnectionsRequest; import com.google.cloud.developerconnect.v1.ListConnectionsResponse; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.ListUsersResponse; import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.UpdateConnectionRequest; +import com.google.cloud.developerconnect.v1.User; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -239,6 +256,107 @@ public class GrpcDeveloperConnectStub extends DeveloperConnectStub { ProtoUtils.marshaller(FetchGitRefsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listAccountConnectorsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/ListAccountConnectors") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAccountConnectorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAccountConnectorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAccountConnectorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/GetAccountConnector") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAccountConnectorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AccountConnector.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAccountConnectorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/CreateAccountConnector") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAccountConnectorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAccountConnectorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/UpdateAccountConnector") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAccountConnectorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAccountConnectorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/DeleteAccountConnector") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAccountConnectorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + fetchAccessTokenMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/FetchAccessToken") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchAccessTokenRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchAccessTokenResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listUsersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/ListUsers") + .setRequestMarshaller(ProtoUtils.marshaller(ListUsersRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListUsersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteUserMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/DeleteUser") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteUserRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor fetchSelfMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/FetchSelf") + .setRequestMarshaller(ProtoUtils.marshaller(FetchSelfRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(User.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteSelfMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/DeleteSelf") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteSelfRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -301,6 +419,37 @@ public class GrpcDeveloperConnectStub extends DeveloperConnectStub { private final UnaryCallable fetchGitRefsCallable; private final UnaryCallable fetchGitRefsPagedCallable; + private final UnaryCallable + listAccountConnectorsCallable; + private final UnaryCallable + listAccountConnectorsPagedCallable; + private final UnaryCallable + getAccountConnectorCallable; + private final UnaryCallable + createAccountConnectorCallable; + private final OperationCallable< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationCallable; + private final UnaryCallable + updateAccountConnectorCallable; + private final OperationCallable< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationCallable; + private final UnaryCallable + deleteAccountConnectorCallable; + private final OperationCallable + deleteAccountConnectorOperationCallable; + private final UnaryCallable + fetchAccessTokenCallable; + private final UnaryCallable listUsersCallable; + private final UnaryCallable listUsersPagedCallable; + private final UnaryCallable deleteUserCallable; + private final OperationCallable + deleteUserOperationCallable; + private final UnaryCallable fetchSelfCallable; + private final UnaryCallable deleteSelfCallable; + private final OperationCallable + deleteSelfOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -506,6 +655,116 @@ protected GrpcDeveloperConnectStub( return builder.build(); }) .build(); + GrpcCallSettings + listAccountConnectorsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAccountConnectorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getAccountConnectorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAccountConnectorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createAccountConnectorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAccountConnectorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateAccountConnectorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAccountConnectorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "account_connector.name", + String.valueOf(request.getAccountConnector().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteAccountConnectorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAccountConnectorMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + fetchAccessTokenTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(fetchAccessTokenMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "account_connector", String.valueOf(request.getAccountConnector())); + return builder.build(); + }) + .build(); + GrpcCallSettings listUsersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listUsersMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteUserTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteUserMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings fetchSelfTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(fetchSelfMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteSelfTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSelfMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -629,6 +888,84 @@ protected GrpcDeveloperConnectStub( this.fetchGitRefsPagedCallable = callableFactory.createPagedCallable( fetchGitRefsTransportSettings, settings.fetchGitRefsSettings(), clientContext); + this.listAccountConnectorsCallable = + callableFactory.createUnaryCallable( + listAccountConnectorsTransportSettings, + settings.listAccountConnectorsSettings(), + clientContext); + this.listAccountConnectorsPagedCallable = + callableFactory.createPagedCallable( + listAccountConnectorsTransportSettings, + settings.listAccountConnectorsSettings(), + clientContext); + this.getAccountConnectorCallable = + callableFactory.createUnaryCallable( + getAccountConnectorTransportSettings, + settings.getAccountConnectorSettings(), + clientContext); + this.createAccountConnectorCallable = + callableFactory.createUnaryCallable( + createAccountConnectorTransportSettings, + settings.createAccountConnectorSettings(), + clientContext); + this.createAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + createAccountConnectorTransportSettings, + settings.createAccountConnectorOperationSettings(), + clientContext, + operationsStub); + this.updateAccountConnectorCallable = + callableFactory.createUnaryCallable( + updateAccountConnectorTransportSettings, + settings.updateAccountConnectorSettings(), + clientContext); + this.updateAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + updateAccountConnectorTransportSettings, + settings.updateAccountConnectorOperationSettings(), + clientContext, + operationsStub); + this.deleteAccountConnectorCallable = + callableFactory.createUnaryCallable( + deleteAccountConnectorTransportSettings, + settings.deleteAccountConnectorSettings(), + clientContext); + this.deleteAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + deleteAccountConnectorTransportSettings, + settings.deleteAccountConnectorOperationSettings(), + clientContext, + operationsStub); + this.fetchAccessTokenCallable = + callableFactory.createUnaryCallable( + fetchAccessTokenTransportSettings, settings.fetchAccessTokenSettings(), clientContext); + this.listUsersCallable = + callableFactory.createUnaryCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.listUsersPagedCallable = + callableFactory.createPagedCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.deleteUserCallable = + callableFactory.createUnaryCallable( + deleteUserTransportSettings, settings.deleteUserSettings(), clientContext); + this.deleteUserOperationCallable = + callableFactory.createOperationCallable( + deleteUserTransportSettings, + settings.deleteUserOperationSettings(), + clientContext, + operationsStub); + this.fetchSelfCallable = + callableFactory.createUnaryCallable( + fetchSelfTransportSettings, settings.fetchSelfSettings(), clientContext); + this.deleteSelfCallable = + callableFactory.createUnaryCallable( + deleteSelfTransportSettings, settings.deleteSelfSettings(), clientContext); + this.deleteSelfOperationCallable = + callableFactory.createOperationCallable( + deleteSelfTransportSettings, + settings.deleteSelfOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -778,6 +1115,99 @@ public UnaryCallable fetchGitRef return fetchGitRefsPagedCallable; } + @Override + public UnaryCallable + listAccountConnectorsCallable() { + return listAccountConnectorsCallable; + } + + @Override + public UnaryCallable + listAccountConnectorsPagedCallable() { + return listAccountConnectorsPagedCallable; + } + + @Override + public UnaryCallable getAccountConnectorCallable() { + return getAccountConnectorCallable; + } + + @Override + public UnaryCallable createAccountConnectorCallable() { + return createAccountConnectorCallable; + } + + @Override + public OperationCallable + createAccountConnectorOperationCallable() { + return createAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable updateAccountConnectorCallable() { + return updateAccountConnectorCallable; + } + + @Override + public OperationCallable + updateAccountConnectorOperationCallable() { + return updateAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable deleteAccountConnectorCallable() { + return deleteAccountConnectorCallable; + } + + @Override + public OperationCallable + deleteAccountConnectorOperationCallable() { + return deleteAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable + fetchAccessTokenCallable() { + return fetchAccessTokenCallable; + } + + @Override + public UnaryCallable listUsersCallable() { + return listUsersCallable; + } + + @Override + public UnaryCallable listUsersPagedCallable() { + return listUsersPagedCallable; + } + + @Override + public UnaryCallable deleteUserCallable() { + return deleteUserCallable; + } + + @Override + public OperationCallable + deleteUserOperationCallable() { + return deleteUserOperationCallable; + } + + @Override + public UnaryCallable fetchSelfCallable() { + return fetchSelfCallable; + } + + @Override + public UnaryCallable deleteSelfCallable() { + return deleteSelfCallable; + } + + @Override + public OperationCallable + deleteSelfOperationCallable() { + return deleteSelfOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceCallableFactory.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceCallableFactory.java new file mode 100644 index 000000000000..577e49f7f32e --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * 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.developerconnect.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the InsightsConfigService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcInsightsConfigServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceStub.java new file mode 100644 index 000000000000..081627e7e150 --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/GrpcInsightsConfigServiceStub.java @@ -0,0 +1,438 @@ +/* + * 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.developerconnect.v1.stub; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; +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.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the InsightsConfigService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcInsightsConfigServiceStub extends InsightsConfigServiceStub { + private static final MethodDescriptor + listInsightsConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/ListInsightsConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInsightsConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInsightsConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createInsightsConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/CreateInsightsConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInsightsConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getInsightsConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/GetInsightsConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInsightsConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(InsightsConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateInsightsConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/UpdateInsightsConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateInsightsConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteInsightsConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/DeleteInsightsConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInsightsConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable + listInsightsConfigsCallable; + private final UnaryCallable + listInsightsConfigsPagedCallable; + private final UnaryCallable createInsightsConfigCallable; + private final OperationCallable + createInsightsConfigOperationCallable; + private final UnaryCallable getInsightsConfigCallable; + private final UnaryCallable updateInsightsConfigCallable; + private final OperationCallable + updateInsightsConfigOperationCallable; + private final UnaryCallable deleteInsightsConfigCallable; + private final OperationCallable + deleteInsightsConfigOperationCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcInsightsConfigServiceStub create( + InsightsConfigServiceStubSettings settings) throws IOException { + return new GrpcInsightsConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcInsightsConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcInsightsConfigServiceStub( + InsightsConfigServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcInsightsConfigServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcInsightsConfigServiceStub( + InsightsConfigServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcInsightsConfigServiceStub, 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 GrpcInsightsConfigServiceStub( + InsightsConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcInsightsConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcInsightsConfigServiceStub, 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 GrpcInsightsConfigServiceStub( + InsightsConfigServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listInsightsConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInsightsConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings createInsightsConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInsightsConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getInsightsConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInsightsConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateInsightsConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateInsightsConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "insights_config.name", + String.valueOf(request.getInsightsConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteInsightsConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInsightsConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.listInsightsConfigsCallable = + callableFactory.createUnaryCallable( + listInsightsConfigsTransportSettings, + settings.listInsightsConfigsSettings(), + clientContext); + this.listInsightsConfigsPagedCallable = + callableFactory.createPagedCallable( + listInsightsConfigsTransportSettings, + settings.listInsightsConfigsSettings(), + clientContext); + this.createInsightsConfigCallable = + callableFactory.createUnaryCallable( + createInsightsConfigTransportSettings, + settings.createInsightsConfigSettings(), + clientContext); + this.createInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + createInsightsConfigTransportSettings, + settings.createInsightsConfigOperationSettings(), + clientContext, + operationsStub); + this.getInsightsConfigCallable = + callableFactory.createUnaryCallable( + getInsightsConfigTransportSettings, + settings.getInsightsConfigSettings(), + clientContext); + this.updateInsightsConfigCallable = + callableFactory.createUnaryCallable( + updateInsightsConfigTransportSettings, + settings.updateInsightsConfigSettings(), + clientContext); + this.updateInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + updateInsightsConfigTransportSettings, + settings.updateInsightsConfigOperationSettings(), + clientContext, + operationsStub); + this.deleteInsightsConfigCallable = + callableFactory.createUnaryCallable( + deleteInsightsConfigTransportSettings, + settings.deleteInsightsConfigSettings(), + clientContext); + this.deleteInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + deleteInsightsConfigTransportSettings, + settings.deleteInsightsConfigOperationSettings(), + clientContext, + operationsStub); + 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()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listInsightsConfigsCallable() { + return listInsightsConfigsCallable; + } + + @Override + public UnaryCallable + listInsightsConfigsPagedCallable() { + return listInsightsConfigsPagedCallable; + } + + @Override + public UnaryCallable createInsightsConfigCallable() { + return createInsightsConfigCallable; + } + + @Override + public OperationCallable + createInsightsConfigOperationCallable() { + return createInsightsConfigOperationCallable; + } + + @Override + public UnaryCallable getInsightsConfigCallable() { + return getInsightsConfigCallable; + } + + @Override + public UnaryCallable updateInsightsConfigCallable() { + return updateInsightsConfigCallable; + } + + @Override + public OperationCallable + updateInsightsConfigOperationCallable() { + return updateInsightsConfigOperationCallable; + } + + @Override + public UnaryCallable deleteInsightsConfigCallable() { + return deleteInsightsConfigCallable; + } + + @Override + public OperationCallable + deleteInsightsConfigOperationCallable() { + return deleteInsightsConfigOperationCallable; + } + + @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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonDeveloperConnectStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonDeveloperConnectStub.java index 9eca26142b4c..1c4a671d865f 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonDeveloperConnectStub.java +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonDeveloperConnectStub.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.HttpRule; import com.google.api.core.InternalApi; @@ -38,11 +40,18 @@ 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.developerconnect.v1.AccountConnector; import com.google.cloud.developerconnect.v1.Connection; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.CreateConnectionRequest; import com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; import com.google.cloud.developerconnect.v1.DeleteConnectionRequest; import com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest; import com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse; import com.google.cloud.developerconnect.v1.FetchGitRefsRequest; @@ -53,15 +62,23 @@ import com.google.cloud.developerconnect.v1.FetchReadTokenResponse; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest; import com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; import com.google.cloud.developerconnect.v1.GetConnectionRequest; import com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest; import com.google.cloud.developerconnect.v1.GitRepositoryLink; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse; import com.google.cloud.developerconnect.v1.ListConnectionsRequest; import com.google.cloud.developerconnect.v1.ListConnectionsResponse; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksRequest; import com.google.cloud.developerconnect.v1.ListGitRepositoryLinksResponse; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.ListUsersResponse; import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; import com.google.cloud.developerconnect.v1.UpdateConnectionRequest; +import com.google.cloud.developerconnect.v1.User; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; @@ -89,6 +106,7 @@ public class HttpJsonDeveloperConnectStub extends DeveloperConnectStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() .add(Empty.getDescriptor()) + .add(AccountConnector.getDescriptor()) .add(Connection.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(GitRepositoryLink.getDescriptor()) @@ -666,6 +684,412 @@ public class HttpJsonDeveloperConnectStub extends DeveloperConnectStub { .build()) .build(); + private static final ApiMethodDescriptor< + ListAccountConnectorsRequest, ListAccountConnectorsResponse> + listAccountConnectorsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/ListAccountConnectors") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/accountConnectors", + 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, "orderBy", request.getOrderBy()); + 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(ListAccountConnectorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAccountConnectorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/GetAccountConnector") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/accountConnectors/*}", + 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(AccountConnector.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAccountConnectorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/CreateAccountConnector") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/accountConnectors", + 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, "accountConnectorId", request.getAccountConnectorId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("accountConnector", request.getAccountConnector(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAccountConnectorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateAccountConnectorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/UpdateAccountConnector") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{accountConnector.name=projects/*/locations/*/accountConnectors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "accountConnector.name", + request.getAccountConnector().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("accountConnector", request.getAccountConnector(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAccountConnectorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAccountConnectorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/DeleteAccountConnector") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/accountConnectors/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAccountConnectorRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + fetchAccessTokenMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.DeveloperConnect/FetchAccessToken") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{accountConnector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "accountConnector", request.getAccountConnector()); + 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().clearAccountConnector().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(FetchAccessTokenResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listUsersMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/ListUsers") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/accountConnectors/*}/users", + 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, "orderBy", request.getOrderBy()); + 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(ListUsersResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteUserMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/DeleteUser") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteUserRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor fetchSelfMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/FetchSelf") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf", + 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(User.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteSelfMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.developerconnect.v1.DeveloperConnect/DeleteSelf") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf", + 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( + (DeleteSelfRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -777,6 +1201,37 @@ public class HttpJsonDeveloperConnectStub extends DeveloperConnectStub { private final UnaryCallable fetchGitRefsCallable; private final UnaryCallable fetchGitRefsPagedCallable; + private final UnaryCallable + listAccountConnectorsCallable; + private final UnaryCallable + listAccountConnectorsPagedCallable; + private final UnaryCallable + getAccountConnectorCallable; + private final UnaryCallable + createAccountConnectorCallable; + private final OperationCallable< + CreateAccountConnectorRequest, AccountConnector, OperationMetadata> + createAccountConnectorOperationCallable; + private final UnaryCallable + updateAccountConnectorCallable; + private final OperationCallable< + UpdateAccountConnectorRequest, AccountConnector, OperationMetadata> + updateAccountConnectorOperationCallable; + private final UnaryCallable + deleteAccountConnectorCallable; + private final OperationCallable + deleteAccountConnectorOperationCallable; + private final UnaryCallable + fetchAccessTokenCallable; + private final UnaryCallable listUsersCallable; + private final UnaryCallable listUsersPagedCallable; + private final UnaryCallable deleteUserCallable; + private final OperationCallable + deleteUserOperationCallable; + private final UnaryCallable fetchSelfCallable; + private final UnaryCallable deleteSelfCallable; + private final OperationCallable + deleteSelfOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1023,6 +1478,126 @@ protected HttpJsonDeveloperConnectStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listAccountConnectorsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAccountConnectorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getAccountConnectorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAccountConnectorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createAccountConnectorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAccountConnectorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateAccountConnectorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAccountConnectorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "account_connector.name", + String.valueOf(request.getAccountConnector().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteAccountConnectorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAccountConnectorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + fetchAccessTokenTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(fetchAccessTokenMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "account_connector", String.valueOf(request.getAccountConnector())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listUsersTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listUsersMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteUserTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteUserMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings fetchSelfTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(fetchSelfMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteSelfTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteSelfMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1149,6 +1724,84 @@ protected HttpJsonDeveloperConnectStub( this.fetchGitRefsPagedCallable = callableFactory.createPagedCallable( fetchGitRefsTransportSettings, settings.fetchGitRefsSettings(), clientContext); + this.listAccountConnectorsCallable = + callableFactory.createUnaryCallable( + listAccountConnectorsTransportSettings, + settings.listAccountConnectorsSettings(), + clientContext); + this.listAccountConnectorsPagedCallable = + callableFactory.createPagedCallable( + listAccountConnectorsTransportSettings, + settings.listAccountConnectorsSettings(), + clientContext); + this.getAccountConnectorCallable = + callableFactory.createUnaryCallable( + getAccountConnectorTransportSettings, + settings.getAccountConnectorSettings(), + clientContext); + this.createAccountConnectorCallable = + callableFactory.createUnaryCallable( + createAccountConnectorTransportSettings, + settings.createAccountConnectorSettings(), + clientContext); + this.createAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + createAccountConnectorTransportSettings, + settings.createAccountConnectorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateAccountConnectorCallable = + callableFactory.createUnaryCallable( + updateAccountConnectorTransportSettings, + settings.updateAccountConnectorSettings(), + clientContext); + this.updateAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + updateAccountConnectorTransportSettings, + settings.updateAccountConnectorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAccountConnectorCallable = + callableFactory.createUnaryCallable( + deleteAccountConnectorTransportSettings, + settings.deleteAccountConnectorSettings(), + clientContext); + this.deleteAccountConnectorOperationCallable = + callableFactory.createOperationCallable( + deleteAccountConnectorTransportSettings, + settings.deleteAccountConnectorOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.fetchAccessTokenCallable = + callableFactory.createUnaryCallable( + fetchAccessTokenTransportSettings, settings.fetchAccessTokenSettings(), clientContext); + this.listUsersCallable = + callableFactory.createUnaryCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.listUsersPagedCallable = + callableFactory.createPagedCallable( + listUsersTransportSettings, settings.listUsersSettings(), clientContext); + this.deleteUserCallable = + callableFactory.createUnaryCallable( + deleteUserTransportSettings, settings.deleteUserSettings(), clientContext); + this.deleteUserOperationCallable = + callableFactory.createOperationCallable( + deleteUserTransportSettings, + settings.deleteUserOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.fetchSelfCallable = + callableFactory.createUnaryCallable( + fetchSelfTransportSettings, settings.fetchSelfSettings(), clientContext); + this.deleteSelfCallable = + callableFactory.createUnaryCallable( + deleteSelfTransportSettings, settings.deleteSelfSettings(), clientContext); + this.deleteSelfOperationCallable = + callableFactory.createOperationCallable( + deleteSelfTransportSettings, + settings.deleteSelfOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1180,6 +1833,16 @@ public static List getMethodDescriptors() { methodDescriptors.add(fetchLinkableGitRepositoriesMethodDescriptor); methodDescriptors.add(fetchGitHubInstallationsMethodDescriptor); methodDescriptors.add(fetchGitRefsMethodDescriptor); + methodDescriptors.add(listAccountConnectorsMethodDescriptor); + methodDescriptors.add(getAccountConnectorMethodDescriptor); + methodDescriptors.add(createAccountConnectorMethodDescriptor); + methodDescriptors.add(updateAccountConnectorMethodDescriptor); + methodDescriptors.add(deleteAccountConnectorMethodDescriptor); + methodDescriptors.add(fetchAccessTokenMethodDescriptor); + methodDescriptors.add(listUsersMethodDescriptor); + methodDescriptors.add(deleteUserMethodDescriptor); + methodDescriptors.add(fetchSelfMethodDescriptor); + methodDescriptors.add(deleteSelfMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; @@ -1320,6 +1983,99 @@ public UnaryCallable fetchGitRef return fetchGitRefsPagedCallable; } + @Override + public UnaryCallable + listAccountConnectorsCallable() { + return listAccountConnectorsCallable; + } + + @Override + public UnaryCallable + listAccountConnectorsPagedCallable() { + return listAccountConnectorsPagedCallable; + } + + @Override + public UnaryCallable getAccountConnectorCallable() { + return getAccountConnectorCallable; + } + + @Override + public UnaryCallable createAccountConnectorCallable() { + return createAccountConnectorCallable; + } + + @Override + public OperationCallable + createAccountConnectorOperationCallable() { + return createAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable updateAccountConnectorCallable() { + return updateAccountConnectorCallable; + } + + @Override + public OperationCallable + updateAccountConnectorOperationCallable() { + return updateAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable deleteAccountConnectorCallable() { + return deleteAccountConnectorCallable; + } + + @Override + public OperationCallable + deleteAccountConnectorOperationCallable() { + return deleteAccountConnectorOperationCallable; + } + + @Override + public UnaryCallable + fetchAccessTokenCallable() { + return fetchAccessTokenCallable; + } + + @Override + public UnaryCallable listUsersCallable() { + return listUsersCallable; + } + + @Override + public UnaryCallable listUsersPagedCallable() { + return listUsersPagedCallable; + } + + @Override + public UnaryCallable deleteUserCallable() { + return deleteUserCallable; + } + + @Override + public OperationCallable + deleteUserOperationCallable() { + return deleteUserOperationCallable; + } + + @Override + public UnaryCallable fetchSelfCallable() { + return fetchSelfCallable; + } + + @Override + public UnaryCallable deleteSelfCallable() { + return deleteSelfCallable; + } + + @Override + public OperationCallable + deleteSelfOperationCallable() { + return deleteSelfOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceCallableFactory.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceCallableFactory.java new file mode 100644 index 000000000000..9a3a692444cb --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceCallableFactory.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.developerconnect.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 InsightsConfigService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonInsightsConfigServiceCallableFactory + 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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceStub.java new file mode 100644 index 000000000000..ac46fee353b1 --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/HttpJsonInsightsConfigServiceStub.java @@ -0,0 +1,713 @@ +/* + * 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.developerconnect.v1.stub; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.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.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; +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; +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 InsightsConfigService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonInsightsConfigServiceStub extends InsightsConfigServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(InsightsConfig.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listInsightsConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/ListInsightsConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/insightsConfigs", + 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, "orderBy", request.getOrderBy()); + 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(ListInsightsConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createInsightsConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/CreateInsightsConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/insightsConfigs", + 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, "insightsConfigId", request.getInsightsConfigId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("insightsConfig", request.getInsightsConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateInsightsConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getInsightsConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/GetInsightsConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/insightsConfigs/*}", + 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(InsightsConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateInsightsConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/UpdateInsightsConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{insightsConfig.name=projects/*/locations/*/insightsConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "insightsConfig.name", + request.getInsightsConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("insightsConfig", request.getInsightsConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateInsightsConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteInsightsConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.developerconnect.v1.InsightsConfigService/DeleteInsightsConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/insightsConfigs/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteInsightsConfigRequest 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 + listInsightsConfigsCallable; + private final UnaryCallable + listInsightsConfigsPagedCallable; + private final UnaryCallable createInsightsConfigCallable; + private final OperationCallable + createInsightsConfigOperationCallable; + private final UnaryCallable getInsightsConfigCallable; + private final UnaryCallable updateInsightsConfigCallable; + private final OperationCallable + updateInsightsConfigOperationCallable; + private final UnaryCallable deleteInsightsConfigCallable; + private final OperationCallable + deleteInsightsConfigOperationCallable; + 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 HttpJsonInsightsConfigServiceStub create( + InsightsConfigServiceStubSettings settings) throws IOException { + return new HttpJsonInsightsConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonInsightsConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonInsightsConfigServiceStub( + InsightsConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonInsightsConfigServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonInsightsConfigServiceStub( + InsightsConfigServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonInsightsConfigServiceStub, 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 HttpJsonInsightsConfigServiceStub( + InsightsConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonInsightsConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonInsightsConfigServiceStub, 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 HttpJsonInsightsConfigServiceStub( + InsightsConfigServiceStubSettings 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 + listInsightsConfigsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listInsightsConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createInsightsConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createInsightsConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getInsightsConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getInsightsConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateInsightsConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateInsightsConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "insights_config.name", + String.valueOf(request.getInsightsConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteInsightsConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteInsightsConfigMethodDescriptor) + .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.listInsightsConfigsCallable = + callableFactory.createUnaryCallable( + listInsightsConfigsTransportSettings, + settings.listInsightsConfigsSettings(), + clientContext); + this.listInsightsConfigsPagedCallable = + callableFactory.createPagedCallable( + listInsightsConfigsTransportSettings, + settings.listInsightsConfigsSettings(), + clientContext); + this.createInsightsConfigCallable = + callableFactory.createUnaryCallable( + createInsightsConfigTransportSettings, + settings.createInsightsConfigSettings(), + clientContext); + this.createInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + createInsightsConfigTransportSettings, + settings.createInsightsConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getInsightsConfigCallable = + callableFactory.createUnaryCallable( + getInsightsConfigTransportSettings, + settings.getInsightsConfigSettings(), + clientContext); + this.updateInsightsConfigCallable = + callableFactory.createUnaryCallable( + updateInsightsConfigTransportSettings, + settings.updateInsightsConfigSettings(), + clientContext); + this.updateInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + updateInsightsConfigTransportSettings, + settings.updateInsightsConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteInsightsConfigCallable = + callableFactory.createUnaryCallable( + deleteInsightsConfigTransportSettings, + settings.deleteInsightsConfigSettings(), + clientContext); + this.deleteInsightsConfigOperationCallable = + callableFactory.createOperationCallable( + deleteInsightsConfigTransportSettings, + settings.deleteInsightsConfigOperationSettings(), + 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(listInsightsConfigsMethodDescriptor); + methodDescriptors.add(createInsightsConfigMethodDescriptor); + methodDescriptors.add(getInsightsConfigMethodDescriptor); + methodDescriptors.add(updateInsightsConfigMethodDescriptor); + methodDescriptors.add(deleteInsightsConfigMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listInsightsConfigsCallable() { + return listInsightsConfigsCallable; + } + + @Override + public UnaryCallable + listInsightsConfigsPagedCallable() { + return listInsightsConfigsPagedCallable; + } + + @Override + public UnaryCallable createInsightsConfigCallable() { + return createInsightsConfigCallable; + } + + @Override + public OperationCallable + createInsightsConfigOperationCallable() { + return createInsightsConfigOperationCallable; + } + + @Override + public UnaryCallable getInsightsConfigCallable() { + return getInsightsConfigCallable; + } + + @Override + public UnaryCallable updateInsightsConfigCallable() { + return updateInsightsConfigCallable; + } + + @Override + public OperationCallable + updateInsightsConfigOperationCallable() { + return updateInsightsConfigOperationCallable; + } + + @Override + public UnaryCallable deleteInsightsConfigCallable() { + return deleteInsightsConfigCallable; + } + + @Override + public OperationCallable + deleteInsightsConfigOperationCallable() { + return deleteInsightsConfigOperationCallable; + } + + @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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStub.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStub.java new file mode 100644 index 000000000000..cfed7f254869 --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStub.java @@ -0,0 +1,118 @@ +/* + * 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.developerconnect.v1.stub; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; +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.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the InsightsConfigService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class InsightsConfigServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listInsightsConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInsightsConfigsPagedCallable()"); + } + + public UnaryCallable + listInsightsConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listInsightsConfigsCallable()"); + } + + public OperationCallable + createInsightsConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createInsightsConfigOperationCallable()"); + } + + public UnaryCallable createInsightsConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createInsightsConfigCallable()"); + } + + public UnaryCallable getInsightsConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getInsightsConfigCallable()"); + } + + public OperationCallable + updateInsightsConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateInsightsConfigOperationCallable()"); + } + + public UnaryCallable updateInsightsConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateInsightsConfigCallable()"); + } + + public OperationCallable + deleteInsightsConfigOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteInsightsConfigOperationCallable()"); + } + + public UnaryCallable deleteInsightsConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInsightsConfigCallable()"); + } + + 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-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStubSettings.java b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStubSettings.java new file mode 100644 index 000000000000..9f1bca3dfd3f --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/main/java/com/google/cloud/developerconnect/v1/stub/InsightsConfigServiceStubSettings.java @@ -0,0 +1,805 @@ +/* + * 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.developerconnect.v1.stub; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +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.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +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.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.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; +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 com.google.protobuf.Empty; +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 InsightsConfigServiceStub}. + * + *

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

    + *
  • The default service address (developerconnect.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 getInsightsConfig: + * + *

{@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
+ * InsightsConfigServiceStubSettings.Builder insightsConfigServiceSettingsBuilder =
+ *     InsightsConfigServiceStubSettings.newBuilder();
+ * insightsConfigServiceSettingsBuilder
+ *     .getInsightsConfigSettings()
+ *     .setRetrySettings(
+ *         insightsConfigServiceSettingsBuilder
+ *             .getInsightsConfigSettings()
+ *             .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());
+ * InsightsConfigServiceStubSettings insightsConfigServiceSettings =
+ *     insightsConfigServiceSettingsBuilder.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 createInsightsConfig: + * + *

{@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
+ * InsightsConfigServiceStubSettings.Builder insightsConfigServiceSettingsBuilder =
+ *     InsightsConfigServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * insightsConfigServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class InsightsConfigServiceStubSettings + 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< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings; + private final UnaryCallSettings + createInsightsConfigSettings; + private final OperationCallSettings< + CreateInsightsConfigRequest, InsightsConfig, OperationMetadata> + createInsightsConfigOperationSettings; + private final UnaryCallSettings + getInsightsConfigSettings; + private final UnaryCallSettings + updateInsightsConfigSettings; + private final OperationCallSettings< + UpdateInsightsConfigRequest, InsightsConfig, OperationMetadata> + updateInsightsConfigOperationSettings; + private final UnaryCallSettings + deleteInsightsConfigSettings; + private final OperationCallSettings + deleteInsightsConfigOperationSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, InsightsConfig> + LIST_INSIGHTS_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, InsightsConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInsightsConfigsRequest injectToken( + ListInsightsConfigsRequest payload, String token) { + return ListInsightsConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInsightsConfigsRequest injectPageSize( + ListInsightsConfigsRequest payload, int pageSize) { + return ListInsightsConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInsightsConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInsightsConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInsightsConfigsResponse payload) { + return payload.getInsightsConfigsList(); + } + }; + + 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< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, ListInsightsConfigsPagedResponse> + LIST_INSIGHTS_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + ListInsightsConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInsightsConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_INSIGHTS_CONFIGS_PAGE_STR_DESC, request, context); + return ListInsightsConfigsPagedResponse.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 listInsightsConfigs. */ + public PagedCallSettings< + ListInsightsConfigsRequest, ListInsightsConfigsResponse, ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings() { + return listInsightsConfigsSettings; + } + + /** Returns the object with the settings used for calls to createInsightsConfig. */ + public UnaryCallSettings createInsightsConfigSettings() { + return createInsightsConfigSettings; + } + + /** Returns the object with the settings used for calls to createInsightsConfig. */ + public OperationCallSettings + createInsightsConfigOperationSettings() { + return createInsightsConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to getInsightsConfig. */ + public UnaryCallSettings getInsightsConfigSettings() { + return getInsightsConfigSettings; + } + + /** Returns the object with the settings used for calls to updateInsightsConfig. */ + public UnaryCallSettings updateInsightsConfigSettings() { + return updateInsightsConfigSettings; + } + + /** Returns the object with the settings used for calls to updateInsightsConfig. */ + public OperationCallSettings + updateInsightsConfigOperationSettings() { + return updateInsightsConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteInsightsConfig. */ + public UnaryCallSettings deleteInsightsConfigSettings() { + return deleteInsightsConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteInsightsConfig. */ + public OperationCallSettings + deleteInsightsConfigOperationSettings() { + return deleteInsightsConfigOperationSettings; + } + + /** 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 InsightsConfigServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcInsightsConfigServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonInsightsConfigServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "developerconnect"; + } + + /** 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 "developerconnect.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "developerconnect.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(InsightsConfigServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(InsightsConfigServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return InsightsConfigServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected InsightsConfigServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listInsightsConfigsSettings = settingsBuilder.listInsightsConfigsSettings().build(); + createInsightsConfigSettings = settingsBuilder.createInsightsConfigSettings().build(); + createInsightsConfigOperationSettings = + settingsBuilder.createInsightsConfigOperationSettings().build(); + getInsightsConfigSettings = settingsBuilder.getInsightsConfigSettings().build(); + updateInsightsConfigSettings = settingsBuilder.updateInsightsConfigSettings().build(); + updateInsightsConfigOperationSettings = + settingsBuilder.updateInsightsConfigOperationSettings().build(); + deleteInsightsConfigSettings = settingsBuilder.deleteInsightsConfigSettings().build(); + deleteInsightsConfigOperationSettings = + settingsBuilder.deleteInsightsConfigOperationSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for InsightsConfigServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings; + private final UnaryCallSettings.Builder + createInsightsConfigSettings; + private final OperationCallSettings.Builder< + CreateInsightsConfigRequest, InsightsConfig, OperationMetadata> + createInsightsConfigOperationSettings; + private final UnaryCallSettings.Builder + getInsightsConfigSettings; + private final UnaryCallSettings.Builder + updateInsightsConfigSettings; + private final OperationCallSettings.Builder< + UpdateInsightsConfigRequest, InsightsConfig, OperationMetadata> + updateInsightsConfigOperationSettings; + private final UnaryCallSettings.Builder + deleteInsightsConfigSettings; + private final OperationCallSettings.Builder< + DeleteInsightsConfigRequest, Empty, OperationMetadata> + deleteInsightsConfigOperationSettings; + 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); + + listInsightsConfigsSettings = + PagedCallSettings.newBuilder(LIST_INSIGHTS_CONFIGS_PAGE_STR_FACT); + createInsightsConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createInsightsConfigOperationSettings = OperationCallSettings.newBuilder(); + getInsightsConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInsightsConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateInsightsConfigOperationSettings = OperationCallSettings.newBuilder(); + deleteInsightsConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteInsightsConfigOperationSettings = OperationCallSettings.newBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInsightsConfigsSettings, + createInsightsConfigSettings, + getInsightsConfigSettings, + updateInsightsConfigSettings, + deleteInsightsConfigSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(InsightsConfigServiceStubSettings settings) { + super(settings); + + listInsightsConfigsSettings = settings.listInsightsConfigsSettings.toBuilder(); + createInsightsConfigSettings = settings.createInsightsConfigSettings.toBuilder(); + createInsightsConfigOperationSettings = + settings.createInsightsConfigOperationSettings.toBuilder(); + getInsightsConfigSettings = settings.getInsightsConfigSettings.toBuilder(); + updateInsightsConfigSettings = settings.updateInsightsConfigSettings.toBuilder(); + updateInsightsConfigOperationSettings = + settings.updateInsightsConfigOperationSettings.toBuilder(); + deleteInsightsConfigSettings = settings.deleteInsightsConfigSettings.toBuilder(); + deleteInsightsConfigOperationSettings = + settings.deleteInsightsConfigOperationSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listInsightsConfigsSettings, + createInsightsConfigSettings, + getInsightsConfigSettings, + updateInsightsConfigSettings, + deleteInsightsConfigSettings, + 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 createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listInsightsConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createInsightsConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getInsightsConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateInsightsConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteInsightsConfigSettings() + .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 + .createInsightsConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(InsightsConfig.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 + .updateInsightsConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(InsightsConfig.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 + .deleteInsightsConfigOperationSettings() + .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; + } + + /** + * 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 listInsightsConfigs. */ + public PagedCallSettings.Builder< + ListInsightsConfigsRequest, + ListInsightsConfigsResponse, + ListInsightsConfigsPagedResponse> + listInsightsConfigsSettings() { + return listInsightsConfigsSettings; + } + + /** Returns the builder for the settings used for calls to createInsightsConfig. */ + public UnaryCallSettings.Builder + createInsightsConfigSettings() { + return createInsightsConfigSettings; + } + + /** Returns the builder for the settings used for calls to createInsightsConfig. */ + public OperationCallSettings.Builder< + CreateInsightsConfigRequest, InsightsConfig, OperationMetadata> + createInsightsConfigOperationSettings() { + return createInsightsConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to getInsightsConfig. */ + public UnaryCallSettings.Builder + getInsightsConfigSettings() { + return getInsightsConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateInsightsConfig. */ + public UnaryCallSettings.Builder + updateInsightsConfigSettings() { + return updateInsightsConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateInsightsConfig. */ + public OperationCallSettings.Builder< + UpdateInsightsConfigRequest, InsightsConfig, OperationMetadata> + updateInsightsConfigOperationSettings() { + return updateInsightsConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteInsightsConfig. */ + public UnaryCallSettings.Builder + deleteInsightsConfigSettings() { + return deleteInsightsConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteInsightsConfig. */ + public OperationCallSettings.Builder + deleteInsightsConfigOperationSettings() { + return deleteInsightsConfigOperationSettings; + } + + /** 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 InsightsConfigServiceStubSettings build() throws IOException { + return new InsightsConfigServiceStubSettings(this); + } + } +} diff --git a/java-developerconnect/google-cloud-developerconnect/src/main/resources/META-INF/native-image/com.google.cloud.developerconnect.v1/reflect-config.json b/java-developerconnect/google-cloud-developerconnect/src/main/resources/META-INF/native-image/com.google.cloud.developerconnect.v1/reflect-config.json index e67e89886cc9..1217b24da65f 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/main/resources/META-INF/native-image/com.google.cloud.developerconnect.v1/reflect-config.json +++ b/java-developerconnect/google-cloud-developerconnect/src/main/resources/META-INF/native-image/com.google.cloud.developerconnect.v1/reflect-config.json @@ -458,6 +458,96 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.developerconnect.v1.AccountConnector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.AccountConnector$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.AppHubWorkload", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.AppHubWorkload$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ArtifactConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ArtifactConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.BitbucketCloudConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.BitbucketCloudConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.developerconnect.v1.Connection", "queryAllDeclaredConstructors": true, @@ -468,7 +558,349 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.Connection$Builder", + "name": "com.google.cloud.developerconnect.v1.Connection$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateConnectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateConnectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CryptoKeyConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.CryptoKeyConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteConnectionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteConnectionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteSelfRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteSelfRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteUserRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.DeleteUserRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ExchangeError", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ExchangeError$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchAccessTokenRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchAccessTokenRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchAccessTokenResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchAccessTokenResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Installation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Installation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest$RefType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.FetchGitRefsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -477,7 +909,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CreateConnectionRequest", + "name": "com.google.cloud.developerconnect.v1.FetchGitRefsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -486,7 +918,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CreateConnectionRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -495,7 +927,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest", + "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -504,7 +936,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CreateGitRepositoryLinkRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -513,7 +945,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CryptoKeyConfig", + "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -522,7 +954,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.CryptoKeyConfig$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchReadTokenRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -531,7 +963,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.DeleteConnectionRequest", + "name": "com.google.cloud.developerconnect.v1.FetchReadTokenRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -540,7 +972,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.DeleteConnectionRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchReadTokenResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -549,7 +981,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest", + "name": "com.google.cloud.developerconnect.v1.FetchReadTokenResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -558,7 +990,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.DeleteGitRepositoryLinkRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -567,7 +999,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest", + "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -576,7 +1008,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -585,7 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse", + "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -594,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Builder", + "name": "com.google.cloud.developerconnect.v1.FetchSelfRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -603,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Installation", + "name": "com.google.cloud.developerconnect.v1.FetchSelfRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -612,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse$Installation$Builder", + "name": "com.google.cloud.developerconnect.v1.GKEWorkload", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -621,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest", + "name": "com.google.cloud.developerconnect.v1.GKEWorkload$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -630,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GetAccountConnectorRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -639,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitRefsRequest$RefType", + "name": "com.google.cloud.developerconnect.v1.GetAccountConnectorRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -648,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitRefsResponse", + "name": "com.google.cloud.developerconnect.v1.GetConnectionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -657,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchGitRefsResponse$Builder", + "name": "com.google.cloud.developerconnect.v1.GetConnectionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -666,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest", + "name": "com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse", + "name": "com.google.cloud.developerconnect.v1.GetInsightsConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse$Builder", + "name": "com.google.cloud.developerconnect.v1.GetInsightsConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadTokenRequest", + "name": "com.google.cloud.developerconnect.v1.GitHubConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadTokenRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GitHubConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadTokenResponse", + "name": "com.google.cloud.developerconnect.v1.GitHubConfig$GitHubApp", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadTokenResponse$Builder", + "name": "com.google.cloud.developerconnect.v1.GitHubEnterpriseConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest", + "name": "com.google.cloud.developerconnect.v1.GitHubEnterpriseConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GitLabConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse", + "name": "com.google.cloud.developerconnect.v1.GitLabConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse$Builder", + "name": "com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GetConnectionRequest", + "name": "com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GetConnectionRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GitProxyConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest", + "name": "com.google.cloud.developerconnect.v1.GitProxyConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GetGitRepositoryLinkRequest$Builder", + "name": "com.google.cloud.developerconnect.v1.GitRepositoryLink", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitHubConfig", + "name": "com.google.cloud.developerconnect.v1.GitRepositoryLink$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitHubConfig$Builder", + "name": "com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitHubConfig$GitHubApp", + "name": "com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitHubEnterpriseConfig", + "name": "com.google.cloud.developerconnect.v1.GoogleArtifactRegistry", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitHubEnterpriseConfig$Builder", + "name": "com.google.cloud.developerconnect.v1.GoogleArtifactRegistry$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitLabConfig", + "name": "com.google.cloud.developerconnect.v1.InsightsConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitLabConfig$Builder", + "name": "com.google.cloud.developerconnect.v1.InsightsConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig", + "name": "com.google.cloud.developerconnect.v1.InsightsConfig$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig$Builder", + "name": "com.google.cloud.developerconnect.v1.InstallationState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitRepositoryLink", + "name": "com.google.cloud.developerconnect.v1.InstallationState$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.GitRepositoryLink$Builder", + "name": "com.google.cloud.developerconnect.v1.InstallationState$Stage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.InstallationState", + "name": "com.google.cloud.developerconnect.v1.LinkableGitRepository", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.InstallationState$Builder", + "name": "com.google.cloud.developerconnect.v1.LinkableGitRepository$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.InstallationState$Stage", + "name": "com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.LinkableGitRepository", + "name": "com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1377,16 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.developerconnect.v1.LinkableGitRepository$Builder", + "name": "com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1025,6 +1466,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListUsersRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListUsersRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListUsersResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ListUsersResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.developerconnect.v1.OAuthCredential", "queryAllDeclaredConstructors": true, @@ -1061,6 +1574,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.developerconnect.v1.ProviderOAuthConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.ProviderOAuthConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.RuntimeConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.RuntimeConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.RuntimeConfig$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.developerconnect.v1.ServiceDirectoryConfig", "queryAllDeclaredConstructors": true, @@ -1079,6 +1637,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.developerconnect.v1.SystemProvider", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.developerconnect.v1.UpdateConnectionRequest", "queryAllDeclaredConstructors": true, @@ -1097,6 +1682,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.User", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.developerconnect.v1.User$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.developerconnect.v1.UserCredential", "queryAllDeclaredConstructors": true, diff --git a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientHttpJsonTest.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientHttpJsonTest.java index a223e28ab52b..0a46fbd3ebed 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientHttpJsonTest.java +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientHttpJsonTest.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; @@ -207,6 +209,7 @@ public void getConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -262,6 +265,7 @@ public void getConnectionTest2() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -317,6 +321,7 @@ public void createConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -382,6 +387,7 @@ public void createConnectionTest2() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -447,6 +453,7 @@ public void updateConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -470,6 +477,7 @@ public void updateConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -513,6 +521,7 @@ public void updateConnectionExceptionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateConnectionAsync(connection, updateMask).get(); @@ -629,6 +638,7 @@ public void createGitRepositoryLinkTest() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); Operation resultOperation = Operation.newBuilder() @@ -696,6 +706,7 @@ public void createGitRepositoryLinkTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); Operation resultOperation = Operation.newBuilder() @@ -959,6 +970,7 @@ public void getGitRepositoryLinkTest() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); mockService.addResponse(expectedResponse); @@ -1020,6 +1032,7 @@ public void getGitRepositoryLinkTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); mockService.addResponse(expectedResponse); @@ -1559,6 +1572,1002 @@ public void fetchGitRefsExceptionTest2() throws Exception { } } + @Test + public void listAccountConnectorsTest() throws Exception { + AccountConnector responsesElement = AccountConnector.newBuilder().build(); + ListAccountConnectorsResponse expectedResponse = + ListAccountConnectorsResponse.newBuilder() + .setNextPageToken("") + .addAllAccountConnectors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAccountConnectorsPagedResponse pagedListResponse = client.listAccountConnectors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountConnectorsList().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 listAccountConnectorsExceptionTest() 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.listAccountConnectors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountConnectorsTest2() throws Exception { + AccountConnector responsesElement = AccountConnector.newBuilder().build(); + ListAccountConnectorsResponse expectedResponse = + ListAccountConnectorsResponse.newBuilder() + .setNextPageToken("") + .addAllAccountConnectors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAccountConnectorsPagedResponse pagedListResponse = client.listAccountConnectors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountConnectorsList().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 listAccountConnectorsExceptionTest2() 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.listAccountConnectors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + mockService.addResponse(expectedResponse); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + AccountConnector actualResponse = client.getAccountConnector(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 getAccountConnectorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.getAccountConnector(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountConnectorTest2() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + + AccountConnector actualResponse = client.getAccountConnector(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 getAccountConnectorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + client.getAccountConnector(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + + AccountConnector actualResponse = + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).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 createAccountConnectorExceptionTest() 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]"); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAccountConnectorTest2() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + + AccountConnector actualResponse = + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).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 createAccountConnectorExceptionTest2() 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"; + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AccountConnector accountConnector = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AccountConnector actualResponse = + client.updateAccountConnectorAsync(accountConnector, updateMask).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 updateAccountConnectorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnector accountConnector = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAccountConnectorAsync(accountConnector, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAccountConnectorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + client.deleteAccountConnectorAsync(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 deleteAccountConnectorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.deleteAccountConnectorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAccountConnectorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + + client.deleteAccountConnectorAsync(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 deleteAccountConnectorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + client.deleteAccountConnectorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void fetchAccessTokenTest() throws Exception { + FetchAccessTokenResponse expectedResponse = + FetchAccessTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .addAllScopes(new ArrayList()) + .setExchangeError(ExchangeError.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AccountConnectorName accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + FetchAccessTokenResponse actualResponse = client.fetchAccessToken(accountConnector); + 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 fetchAccessTokenExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.fetchAccessToken(accountConnector); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchAccessTokenTest2() throws Exception { + FetchAccessTokenResponse expectedResponse = + FetchAccessTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .addAllScopes(new ArrayList()) + .setExchangeError(ExchangeError.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String accountConnector = + "projects/project-5342/locations/location-5342/accountConnectors/accountConnector-5342"; + + FetchAccessTokenResponse actualResponse = client.fetchAccessToken(accountConnector); + 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 fetchAccessTokenExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String accountConnector = + "projects/project-5342/locations/location-5342/accountConnectors/accountConnector-5342"; + client.fetchAccessToken(accountConnector); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsersTest() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AccountConnectorName parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().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 listUsersExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsersTest2() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-2472/locations/location-2472/accountConnectors/accountConnector-2472"; + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().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 listUsersExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-2472/locations/location-2472/accountConnectors/accountConnector-2472"; + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]"); + + client.deleteUserAsync(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 deleteUserExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]"); + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteUserTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-8611/locations/location-8611/accountConnectors/accountConnector-8611/users/user-8611"; + + client.deleteUserAsync(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 deleteUserExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8611/locations/location-8611/accountConnectors/accountConnector-8611/users/user-8611"; + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void fetchSelfTest() throws Exception { + User expectedResponse = + User.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setLastTokenRequestTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + User actualResponse = client.fetchSelf(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 fetchSelfExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.fetchSelf(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchSelfTest2() throws Exception { + User expectedResponse = + User.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setLastTokenRequestTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + + User actualResponse = client.fetchSelf(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 fetchSelfExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + client.fetchSelf(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSelfTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSelfTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + client.deleteSelfAsync(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 deleteSelfExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.deleteSelfAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteSelfTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSelfTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + + client.deleteSelfAsync(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 deleteSelfExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-1769/locations/location-1769/accountConnectors/accountConnector-1769"; + client.deleteSelfAsync(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-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientTest.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientTest.java index b83438aec1a0..293ff87c5bb5 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientTest.java +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/DeveloperConnectClientTest.java @@ -18,9 +18,11 @@ import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchGitRefsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.FetchLinkableGitRepositoriesPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListAccountConnectorsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListConnectionsPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListGitRepositoryLinksPagedResponse; import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListLocationsPagedResponse; +import static com.google.cloud.developerconnect.v1.DeveloperConnectClient.ListUsersPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -202,6 +204,7 @@ public void getConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); mockDeveloperConnect.addResponse(expectedResponse); @@ -251,6 +254,7 @@ public void getConnectionTest2() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); mockDeveloperConnect.addResponse(expectedResponse); @@ -300,6 +304,7 @@ public void createConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -364,6 +369,7 @@ public void createConnectionTest2() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -428,6 +434,7 @@ public void updateConnectionTest() throws Exception { .setEtag("etag3123477") .setUid("uid115792") .setCryptoKeyConfig(CryptoKeyConfig.newBuilder().build()) + .setGitProxyConfig(GitProxyConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -574,6 +581,7 @@ public void createGitRepositoryLinkTest() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); Operation resultOperation = Operation.newBuilder() @@ -641,6 +649,7 @@ public void createGitRepositoryLinkTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); Operation resultOperation = Operation.newBuilder() @@ -888,6 +897,7 @@ public void getGitRepositoryLinkTest() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); mockDeveloperConnect.addResponse(expectedResponse); @@ -944,6 +954,7 @@ public void getGitRepositoryLinkTest2() throws Exception { .putAllAnnotations(new HashMap()) .setUid("uid115792") .setWebhookId("webhookId-544129550") + .setGitProxyUri("gitProxyUri306660880") .build(); mockDeveloperConnect.addResponse(expectedResponse); @@ -1414,6 +1425,891 @@ public void fetchGitRefsExceptionTest2() throws Exception { } } + @Test + public void listAccountConnectorsTest() throws Exception { + AccountConnector responsesElement = AccountConnector.newBuilder().build(); + ListAccountConnectorsResponse expectedResponse = + ListAccountConnectorsResponse.newBuilder() + .setNextPageToken("") + .addAllAccountConnectors(Arrays.asList(responsesElement)) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAccountConnectorsPagedResponse pagedListResponse = client.listAccountConnectors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountConnectorsList().get(0), resources.get(0)); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccountConnectorsRequest actualRequest = + ((ListAccountConnectorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccountConnectorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAccountConnectors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAccountConnectorsTest2() throws Exception { + AccountConnector responsesElement = AccountConnector.newBuilder().build(); + ListAccountConnectorsResponse expectedResponse = + ListAccountConnectorsResponse.newBuilder() + .setNextPageToken("") + .addAllAccountConnectors(Arrays.asList(responsesElement)) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAccountConnectorsPagedResponse pagedListResponse = client.listAccountConnectors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountConnectorsList().get(0), resources.get(0)); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccountConnectorsRequest actualRequest = + ((ListAccountConnectorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAccountConnectorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAccountConnectors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + AccountConnector actualResponse = client.getAccountConnector(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAccountConnectorRequest actualRequest = ((GetAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAccountConnectorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.getAccountConnector(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountConnectorTest2() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + String name = "name3373707"; + + AccountConnector actualResponse = client.getAccountConnector(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAccountConnectorRequest actualRequest = ((GetAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAccountConnectorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String name = "name3373707"; + client.getAccountConnector(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + + AccountConnector actualResponse = + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAccountConnectorRequest actualRequest = + ((CreateAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(accountConnector, actualRequest.getAccountConnector()); + Assert.assertEquals(accountConnectorId, actualRequest.getAccountConnectorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAccountConnectorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAccountConnectorTest2() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + String parent = "parent-995424086"; + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + + AccountConnector actualResponse = + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAccountConnectorRequest actualRequest = + ((CreateAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(accountConnector, actualRequest.getAccountConnector()); + Assert.assertEquals(accountConnectorId, actualRequest.getAccountConnectorId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAccountConnectorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String parent = "parent-995424086"; + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + client.createAccountConnectorAsync(parent, accountConnector, accountConnectorId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateAccountConnectorTest() throws Exception { + AccountConnector expectedResponse = + AccountConnector.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .setEtag("etag3123477") + .putAllLabels(new HashMap()) + .setOauthStartUri("oauthStartUri-1592753823") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AccountConnector actualResponse = + client.updateAccountConnectorAsync(accountConnector, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAccountConnectorRequest actualRequest = + ((UpdateAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(accountConnector, actualRequest.getAccountConnector()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAccountConnectorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAccountConnectorAsync(accountConnector, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAccountConnectorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + client.deleteAccountConnectorAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAccountConnectorRequest actualRequest = + ((DeleteAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAccountConnectorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.deleteAccountConnectorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAccountConnectorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAccountConnectorTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAccountConnectorAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAccountConnectorRequest actualRequest = + ((DeleteAccountConnectorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAccountConnectorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String name = "name3373707"; + client.deleteAccountConnectorAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void fetchAccessTokenTest() throws Exception { + FetchAccessTokenResponse expectedResponse = + FetchAccessTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .addAllScopes(new ArrayList()) + .setExchangeError(ExchangeError.newBuilder().build()) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + AccountConnectorName accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + FetchAccessTokenResponse actualResponse = client.fetchAccessToken(accountConnector); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchAccessTokenRequest actualRequest = ((FetchAccessTokenRequest) actualRequests.get(0)); + + Assert.assertEquals(accountConnector.toString(), actualRequest.getAccountConnector()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchAccessTokenExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.fetchAccessToken(accountConnector); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchAccessTokenTest2() throws Exception { + FetchAccessTokenResponse expectedResponse = + FetchAccessTokenResponse.newBuilder() + .setToken("token110541305") + .setExpirationTime(Timestamp.newBuilder().build()) + .addAllScopes(new ArrayList()) + .setExchangeError(ExchangeError.newBuilder().build()) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + String accountConnector = "accountConnector-2141410144"; + + FetchAccessTokenResponse actualResponse = client.fetchAccessToken(accountConnector); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchAccessTokenRequest actualRequest = ((FetchAccessTokenRequest) actualRequests.get(0)); + + Assert.assertEquals(accountConnector, actualRequest.getAccountConnector()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchAccessTokenExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String accountConnector = "accountConnector-2141410144"; + client.fetchAccessToken(accountConnector); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsersTest() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + AccountConnectorName parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().get(0), resources.get(0)); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUsersRequest actualRequest = ((ListUsersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUsersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUsersTest2() throws Exception { + User responsesElement = User.newBuilder().build(); + ListUsersResponse expectedResponse = + ListUsersResponse.newBuilder() + .setNextPageToken("") + .addAllUsers(Arrays.asList(responsesElement)) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListUsersPagedResponse pagedListResponse = client.listUsers(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUsersList().get(0), resources.get(0)); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUsersRequest actualRequest = ((ListUsersRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUsersExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String parent = "parent-995424086"; + client.listUsers(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteUserTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]"); + + client.deleteUserAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserRequest actualRequest = ((DeleteUserRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]"); + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteUserTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteUserTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteUserAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserRequest actualRequest = ((DeleteUserRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String name = "name3373707"; + client.deleteUserAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void fetchSelfTest() throws Exception { + User expectedResponse = + User.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setLastTokenRequestTime(Timestamp.newBuilder().build()) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + User actualResponse = client.fetchSelf(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchSelfRequest actualRequest = ((FetchSelfRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchSelfExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.fetchSelf(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void fetchSelfTest2() throws Exception { + User expectedResponse = + User.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString()) + .setDisplayName("displayName1714148973") + .setCreateTime(Timestamp.newBuilder().build()) + .setLastTokenRequestTime(Timestamp.newBuilder().build()) + .build(); + mockDeveloperConnect.addResponse(expectedResponse); + + String name = "name3373707"; + + User actualResponse = client.fetchSelf(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchSelfRequest actualRequest = ((FetchSelfRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchSelfExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String name = "name3373707"; + client.fetchSelf(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteSelfTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSelfTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + + client.deleteSelfAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSelfRequest actualRequest = ((DeleteSelfRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSelfExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + client.deleteSelfAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteSelfTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteSelfTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDeveloperConnect.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteSelfAsync(name).get(); + + List actualRequests = mockDeveloperConnect.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSelfRequest actualRequest = ((DeleteSelfRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteSelfExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDeveloperConnect.addException(exception); + + try { + String name = "name3373707"; + client.deleteSelfAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientHttpJsonTest.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..8b13fec96f5b --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientHttpJsonTest.java @@ -0,0 +1,730 @@ +/* + * 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.developerconnect.v1; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.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.developerconnect.v1.stub.HttpJsonInsightsConfigServiceStub; +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 com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +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; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class InsightsConfigServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static InsightsConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonInsightsConfigServiceStub.getMethodDescriptors(), + InsightsConfigServiceSettings.getDefaultEndpoint()); + InsightsConfigServiceSettings settings = + InsightsConfigServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + InsightsConfigServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = InsightsConfigServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listInsightsConfigsTest() throws Exception { + InsightsConfig responsesElement = InsightsConfig.newBuilder().build(); + ListInsightsConfigsResponse expectedResponse = + ListInsightsConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllInsightsConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInsightsConfigsPagedResponse pagedListResponse = client.listInsightsConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInsightsConfigsList().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 listInsightsConfigsExceptionTest() 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.listInsightsConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInsightsConfigsTest2() throws Exception { + InsightsConfig responsesElement = InsightsConfig.newBuilder().build(); + ListInsightsConfigsResponse expectedResponse = + ListInsightsConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllInsightsConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListInsightsConfigsPagedResponse pagedListResponse = client.listInsightsConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInsightsConfigsList().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 listInsightsConfigsExceptionTest2() 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.listInsightsConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + + InsightsConfig actualResponse = + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).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 createInsightsConfigExceptionTest() 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]"); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createInsightsConfigTest2() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + + InsightsConfig actualResponse = + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).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 createInsightsConfigExceptionTest2() 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"; + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + InsightsConfigName name = InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + + InsightsConfig actualResponse = client.getInsightsConfig(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 getInsightsConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + client.getInsightsConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInsightsConfigTest2() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9084/locations/location-9084/insightsConfigs/insightsConfig-9084"; + + InsightsConfig actualResponse = client.getInsightsConfig(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 getInsightsConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9084/locations/location-9084/insightsConfigs/insightsConfig-9084"; + client.getInsightsConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig( + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + + InsightsConfig actualResponse = client.updateInsightsConfigAsync(request).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 updateInsightsConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig( + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + client.updateInsightsConfigAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInsightsConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + InsightsConfigName name = InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + + client.deleteInsightsConfigAsync(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 deleteInsightsConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + client.deleteInsightsConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteInsightsConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9084/locations/location-9084/insightsConfigs/insightsConfig-9084"; + + client.deleteInsightsConfigAsync(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 deleteInsightsConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9084/locations/location-9084/insightsConfigs/insightsConfig-9084"; + client.deleteInsightsConfigAsync(name).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-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientTest.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientTest.java new file mode 100644 index 000000000000..183e455519af --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceClientTest.java @@ -0,0 +1,665 @@ +/* + * 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.developerconnect.v1; + +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListInsightsConfigsPagedResponse; +import static com.google.cloud.developerconnect.v1.InsightsConfigServiceClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +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.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +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 InsightsConfigServiceClientTest { + private static MockInsightsConfigService mockInsightsConfigService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private InsightsConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockInsightsConfigService = new MockInsightsConfigService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockInsightsConfigService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + InsightsConfigServiceSettings settings = + InsightsConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = InsightsConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listInsightsConfigsTest() throws Exception { + InsightsConfig responsesElement = InsightsConfig.newBuilder().build(); + ListInsightsConfigsResponse expectedResponse = + ListInsightsConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllInsightsConfigs(Arrays.asList(responsesElement)) + .build(); + mockInsightsConfigService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListInsightsConfigsPagedResponse pagedListResponse = client.listInsightsConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInsightsConfigsList().get(0), resources.get(0)); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInsightsConfigsRequest actualRequest = ((ListInsightsConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInsightsConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listInsightsConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listInsightsConfigsTest2() throws Exception { + InsightsConfig responsesElement = InsightsConfig.newBuilder().build(); + ListInsightsConfigsResponse expectedResponse = + ListInsightsConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllInsightsConfigs(Arrays.asList(responsesElement)) + .build(); + mockInsightsConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListInsightsConfigsPagedResponse pagedListResponse = client.listInsightsConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInsightsConfigsList().get(0), resources.get(0)); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInsightsConfigsRequest actualRequest = ((ListInsightsConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listInsightsConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listInsightsConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInsightsConfigService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + + InsightsConfig actualResponse = + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInsightsConfigRequest actualRequest = + ((CreateInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(insightsConfig, actualRequest.getInsightsConfig()); + Assert.assertEquals(insightsConfigId, actualRequest.getInsightsConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInsightsConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createInsightsConfigTest2() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInsightsConfigService.addResponse(resultOperation); + + String parent = "parent-995424086"; + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + + InsightsConfig actualResponse = + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInsightsConfigRequest actualRequest = + ((CreateInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(insightsConfig, actualRequest.getInsightsConfig()); + Assert.assertEquals(insightsConfigId, actualRequest.getInsightsConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createInsightsConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + client.createInsightsConfigAsync(parent, insightsConfig, insightsConfigId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + mockInsightsConfigService.addResponse(expectedResponse); + + InsightsConfigName name = InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + + InsightsConfig actualResponse = client.getInsightsConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInsightsConfigRequest actualRequest = ((GetInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInsightsConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + client.getInsightsConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getInsightsConfigTest2() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + mockInsightsConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + InsightsConfig actualResponse = client.getInsightsConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInsightsConfigRequest actualRequest = ((GetInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getInsightsConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.getInsightsConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateInsightsConfigTest() throws Exception { + InsightsConfig expectedResponse = + InsightsConfig.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllRuntimeConfigs(new ArrayList()) + .addAllArtifactConfigs(new ArrayList()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setReconciling(true) + .addAllErrors(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInsightsConfigService.addResponse(resultOperation); + + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + + InsightsConfig actualResponse = client.updateInsightsConfigAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateInsightsConfigRequest actualRequest = + ((UpdateInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInsightsConfig(), actualRequest.getInsightsConfig()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getAllowMissing(), actualRequest.getAllowMissing()); + Assert.assertEquals(request.getValidateOnly(), actualRequest.getValidateOnly()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateInsightsConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + client.updateInsightsConfigAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInsightsConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInsightsConfigService.addResponse(resultOperation); + + InsightsConfigName name = InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + + client.deleteInsightsConfigAsync(name).get(); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInsightsConfigRequest actualRequest = + ((DeleteInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInsightsConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + client.deleteInsightsConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteInsightsConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteInsightsConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockInsightsConfigService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteInsightsConfigAsync(name).get(); + + List actualRequests = mockInsightsConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInsightsConfigRequest actualRequest = + ((DeleteInsightsConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteInsightsConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockInsightsConfigService.addException(exception); + + try { + String name = "name3373707"; + client.deleteInsightsConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .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 = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .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(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockDeveloperConnectImpl.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockDeveloperConnectImpl.java index c64e114605a8..7483f27a511a 100644 --- a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockDeveloperConnectImpl.java +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockDeveloperConnectImpl.java @@ -362,4 +362,216 @@ public void fetchGitRefs( Exception.class.getName()))); } } + + @Override + public void listAccountConnectors( + ListAccountConnectorsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAccountConnectorsResponse) { + requests.add(request); + responseObserver.onNext(((ListAccountConnectorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAccountConnectors, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListAccountConnectorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAccountConnector( + GetAccountConnectorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AccountConnector) { + requests.add(request); + responseObserver.onNext(((AccountConnector) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAccountConnector, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AccountConnector.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAccountConnector( + CreateAccountConnectorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAccountConnector, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAccountConnector( + UpdateAccountConnectorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAccountConnector, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAccountConnector( + DeleteAccountConnectorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAccountConnector, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchAccessToken( + FetchAccessTokenRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchAccessTokenResponse) { + requests.add(request); + responseObserver.onNext(((FetchAccessTokenResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FetchAccessToken, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchAccessTokenResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listUsers( + ListUsersRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListUsersResponse) { + requests.add(request); + responseObserver.onNext(((ListUsersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUsers, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListUsersResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteUser(DeleteUserRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteUser, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchSelf(FetchSelfRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof User) { + requests.add(request); + responseObserver.onNext(((User) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FetchSelf, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + User.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteSelf(DeleteSelfRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteSelf, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigService.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigService.java new file mode 100644 index 000000000000..fe75111ddc5b --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigService.java @@ -0,0 +1,59 @@ +/* + * 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.developerconnect.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockInsightsConfigService implements MockGrpcService { + private final MockInsightsConfigServiceImpl serviceImpl; + + public MockInsightsConfigService() { + serviceImpl = new MockInsightsConfigServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigServiceImpl.java b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigServiceImpl.java new file mode 100644 index 000000000000..284751773ddf --- /dev/null +++ b/java-developerconnect/google-cloud-developerconnect/src/test/java/com/google/cloud/developerconnect/v1/MockInsightsConfigServiceImpl.java @@ -0,0 +1,170 @@ +/* + * 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.developerconnect.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceGrpc.InsightsConfigServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockInsightsConfigServiceImpl extends InsightsConfigServiceImplBase { + private List requests; + private Queue responses; + + public MockInsightsConfigServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listInsightsConfigs( + ListInsightsConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListInsightsConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListInsightsConfigsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListInsightsConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListInsightsConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createInsightsConfig( + CreateInsightsConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateInsightsConfig, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getInsightsConfig( + GetInsightsConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof InsightsConfig) { + requests.add(request); + responseObserver.onNext(((InsightsConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetInsightsConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + InsightsConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateInsightsConfig( + UpdateInsightsConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateInsightsConfig, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteInsightsConfig( + DeleteInsightsConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteInsightsConfig, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectGrpc.java b/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectGrpc.java index 116c75d593fa..d81404b4795d 100644 --- a/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectGrpc.java +++ b/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectGrpc.java @@ -716,6 +716,481 @@ private DeveloperConnectGrpc() {} return getFetchGitRefsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + getListAccountConnectorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAccountConnectors", + requestType = com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.class, + responseType = com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + getListAccountConnectorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + getListAccountConnectorsMethod; + if ((getListAccountConnectorsMethod = DeveloperConnectGrpc.getListAccountConnectorsMethod) + == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getListAccountConnectorsMethod = DeveloperConnectGrpc.getListAccountConnectorsMethod) + == null) { + DeveloperConnectGrpc.getListAccountConnectorsMethod = + getListAccountConnectorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAccountConnectors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("ListAccountConnectors")) + .build(); + } + } + } + return getListAccountConnectorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest, + com.google.cloud.developerconnect.v1.AccountConnector> + getGetAccountConnectorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAccountConnector", + requestType = com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.class, + responseType = com.google.cloud.developerconnect.v1.AccountConnector.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest, + com.google.cloud.developerconnect.v1.AccountConnector> + getGetAccountConnectorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest, + com.google.cloud.developerconnect.v1.AccountConnector> + getGetAccountConnectorMethod; + if ((getGetAccountConnectorMethod = DeveloperConnectGrpc.getGetAccountConnectorMethod) + == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getGetAccountConnectorMethod = DeveloperConnectGrpc.getGetAccountConnectorMethod) + == null) { + DeveloperConnectGrpc.getGetAccountConnectorMethod = + getGetAccountConnectorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetAccountConnector")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.AccountConnector + .getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("GetAccountConnector")) + .build(); + } + } + } + return getGetAccountConnectorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest, + com.google.longrunning.Operation> + getCreateAccountConnectorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAccountConnector", + requestType = com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest, + com.google.longrunning.Operation> + getCreateAccountConnectorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest, + com.google.longrunning.Operation> + getCreateAccountConnectorMethod; + if ((getCreateAccountConnectorMethod = DeveloperConnectGrpc.getCreateAccountConnectorMethod) + == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getCreateAccountConnectorMethod = DeveloperConnectGrpc.getCreateAccountConnectorMethod) + == null) { + DeveloperConnectGrpc.getCreateAccountConnectorMethod = + getCreateAccountConnectorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAccountConnector")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("CreateAccountConnector")) + .build(); + } + } + } + return getCreateAccountConnectorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest, + com.google.longrunning.Operation> + getUpdateAccountConnectorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAccountConnector", + requestType = com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest, + com.google.longrunning.Operation> + getUpdateAccountConnectorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest, + com.google.longrunning.Operation> + getUpdateAccountConnectorMethod; + if ((getUpdateAccountConnectorMethod = DeveloperConnectGrpc.getUpdateAccountConnectorMethod) + == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getUpdateAccountConnectorMethod = DeveloperConnectGrpc.getUpdateAccountConnectorMethod) + == null) { + DeveloperConnectGrpc.getUpdateAccountConnectorMethod = + getUpdateAccountConnectorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAccountConnector")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("UpdateAccountConnector")) + .build(); + } + } + } + return getUpdateAccountConnectorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest, + com.google.longrunning.Operation> + getDeleteAccountConnectorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAccountConnector", + requestType = com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest, + com.google.longrunning.Operation> + getDeleteAccountConnectorMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest, + com.google.longrunning.Operation> + getDeleteAccountConnectorMethod; + if ((getDeleteAccountConnectorMethod = DeveloperConnectGrpc.getDeleteAccountConnectorMethod) + == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getDeleteAccountConnectorMethod = DeveloperConnectGrpc.getDeleteAccountConnectorMethod) + == null) { + DeveloperConnectGrpc.getDeleteAccountConnectorMethod = + getDeleteAccountConnectorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteAccountConnector")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("DeleteAccountConnector")) + .build(); + } + } + } + return getDeleteAccountConnectorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse> + getFetchAccessTokenMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchAccessToken", + requestType = com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.class, + responseType = com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse> + getFetchAccessTokenMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse> + getFetchAccessTokenMethod; + if ((getFetchAccessTokenMethod = DeveloperConnectGrpc.getFetchAccessTokenMethod) == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getFetchAccessTokenMethod = DeveloperConnectGrpc.getFetchAccessTokenMethod) == null) { + DeveloperConnectGrpc.getFetchAccessTokenMethod = + getFetchAccessTokenMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FetchAccessToken")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("FetchAccessToken")) + .build(); + } + } + } + return getFetchAccessTokenMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListUsersRequest, + com.google.cloud.developerconnect.v1.ListUsersResponse> + getListUsersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUsers", + requestType = com.google.cloud.developerconnect.v1.ListUsersRequest.class, + responseType = com.google.cloud.developerconnect.v1.ListUsersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListUsersRequest, + com.google.cloud.developerconnect.v1.ListUsersResponse> + getListUsersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListUsersRequest, + com.google.cloud.developerconnect.v1.ListUsersResponse> + getListUsersMethod; + if ((getListUsersMethod = DeveloperConnectGrpc.getListUsersMethod) == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getListUsersMethod = DeveloperConnectGrpc.getListUsersMethod) == null) { + DeveloperConnectGrpc.getListUsersMethod = + getListUsersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUsers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListUsersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListUsersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("ListUsers")) + .build(); + } + } + } + return getListUsersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteUserRequest, com.google.longrunning.Operation> + getDeleteUserMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteUser", + requestType = com.google.cloud.developerconnect.v1.DeleteUserRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteUserRequest, com.google.longrunning.Operation> + getDeleteUserMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteUserRequest, + com.google.longrunning.Operation> + getDeleteUserMethod; + if ((getDeleteUserMethod = DeveloperConnectGrpc.getDeleteUserMethod) == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getDeleteUserMethod = DeveloperConnectGrpc.getDeleteUserMethod) == null) { + DeveloperConnectGrpc.getDeleteUserMethod = + getDeleteUserMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteUser")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.DeleteUserRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("DeleteUser")) + .build(); + } + } + } + return getDeleteUserMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchSelfRequest, + com.google.cloud.developerconnect.v1.User> + getFetchSelfMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchSelf", + requestType = com.google.cloud.developerconnect.v1.FetchSelfRequest.class, + responseType = com.google.cloud.developerconnect.v1.User.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchSelfRequest, + com.google.cloud.developerconnect.v1.User> + getFetchSelfMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.FetchSelfRequest, + com.google.cloud.developerconnect.v1.User> + getFetchSelfMethod; + if ((getFetchSelfMethod = DeveloperConnectGrpc.getFetchSelfMethod) == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getFetchSelfMethod = DeveloperConnectGrpc.getFetchSelfMethod) == null) { + DeveloperConnectGrpc.getFetchSelfMethod = + getFetchSelfMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FetchSelf")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.FetchSelfRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.User.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("FetchSelf")) + .build(); + } + } + } + return getFetchSelfMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteSelfRequest, com.google.longrunning.Operation> + getDeleteSelfMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSelf", + requestType = com.google.cloud.developerconnect.v1.DeleteSelfRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteSelfRequest, com.google.longrunning.Operation> + getDeleteSelfMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteSelfRequest, + com.google.longrunning.Operation> + getDeleteSelfMethod; + if ((getDeleteSelfMethod = DeveloperConnectGrpc.getDeleteSelfMethod) == null) { + synchronized (DeveloperConnectGrpc.class) { + if ((getDeleteSelfMethod = DeveloperConnectGrpc.getDeleteSelfMethod) == null) { + DeveloperConnectGrpc.getDeleteSelfMethod = + getDeleteSelfMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSelf")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.DeleteSelfRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DeveloperConnectMethodDescriptorSupplier("DeleteSelf")) + .build(); + } + } + } + return getDeleteSelfMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static DeveloperConnectStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -911,89 +1386,230 @@ default void getGitRepositoryLink( io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGitRepositoryLinkMethod(), responseObserver); + getGetGitRepositoryLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches read/write token of a given gitRepositoryLink.
+     * 
+ */ + default void fetchReadWriteToken( + com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchReadWriteTokenMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches read token of a given gitRepositoryLink.
+     * 
+ */ + default void fetchReadToken( + com.google.cloud.developerconnect.v1.FetchReadTokenRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchReadTokenMethod(), responseObserver); + } + + /** + * + * + *
+     * FetchLinkableGitRepositories returns a list of git repositories from an SCM
+     * that are available to be added to a Connection.
+     * 
+ */ + default void fetchLinkableGitRepositories( + com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchLinkableGitRepositoriesMethod(), responseObserver); + } + + /** + * + * + *
+     * FetchGitHubInstallations returns the list of GitHub Installations that
+     * are available to be added to a Connection.
+     * For github.com, only installations accessible to the authorizer token
+     * are returned. For GitHub Enterprise, all installations are returned.
+     * 
+ */ + default void fetchGitHubInstallations( + com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchGitHubInstallationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetch the list of branches or tags for a given repository.
+     * 
+ */ + default void fetchGitRefs( + com.google.cloud.developerconnect.v1.FetchGitRefsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchGitRefsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists AccountConnectors in a given project and location.
+     * 
+ */ + default void listAccountConnectors( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAccountConnectorsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AccountConnector.
+     * 
+ */ + default void getAccountConnector( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAccountConnectorMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new AccountConnector in a given project and location.
+     * 
+ */ + default void createAccountConnector( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAccountConnectorMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single AccountConnector.
+     * 
+ */ + default void updateAccountConnector( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAccountConnectorMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single AccountConnector.
+     * 
+ */ + default void deleteAccountConnector( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAccountConnectorMethod(), responseObserver); } /** * * *
-     * Fetches read/write token of a given gitRepositoryLink.
+     * Fetches OAuth access token based on end user credentials.
      * 
*/ - default void fetchReadWriteToken( - com.google.cloud.developerconnect.v1.FetchReadWriteTokenRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.developerconnect.v1.FetchReadWriteTokenResponse> + default void fetchAccessToken( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFetchReadWriteTokenMethod(), responseObserver); + getFetchAccessTokenMethod(), responseObserver); } /** * * *
-     * Fetches read token of a given gitRepositoryLink.
+     * Lists Users in a given project, location, and account_connector.
      * 
*/ - default void fetchReadToken( - com.google.cloud.developerconnect.v1.FetchReadTokenRequest request, - io.grpc.stub.StreamObserver + default void listUsers( + com.google.cloud.developerconnect.v1.ListUsersRequest request, + io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFetchReadTokenMethod(), responseObserver); + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListUsersMethod(), responseObserver); } /** * * *
-     * FetchLinkableGitRepositories returns a list of git repositories from an SCM
-     * that are available to be added to a Connection.
+     * Deletes a single User.
      * 
*/ - default void fetchLinkableGitRepositories( - com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFetchLinkableGitRepositoriesMethod(), responseObserver); + default void deleteUser( + com.google.cloud.developerconnect.v1.DeleteUserRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteUserMethod(), responseObserver); } /** * * *
-     * FetchGitHubInstallations returns the list of GitHub Installations that
-     * are available to be added to a Connection.
-     * For github.com, only installations accessible to the authorizer token
-     * are returned. For GitHub Enterprise, all installations are returned.
+     * Fetch the User based on the user credentials.
      * 
*/ - default void fetchGitHubInstallations( - com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFetchGitHubInstallationsMethod(), responseObserver); + default void fetchSelf( + com.google.cloud.developerconnect.v1.FetchSelfRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFetchSelfMethod(), responseObserver); } /** * * *
-     * Fetch the list of branches or tags for a given repository.
+     * Delete the User based on the user credentials.
      * 
*/ - default void fetchGitRefs( - com.google.cloud.developerconnect.v1.FetchGitRefsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getFetchGitRefsMethod(), responseObserver); + default void deleteSelf( + com.google.cloud.developerconnect.v1.DeleteSelfRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSelfMethod(), responseObserver); } } @@ -1275,6 +1891,163 @@ public void fetchGitRefs( request, responseObserver); } + + /** + * + * + *
+     * Lists AccountConnectors in a given project and location.
+     * 
+ */ + public void listAccountConnectors( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAccountConnectorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AccountConnector.
+     * 
+ */ + public void getAccountConnector( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAccountConnectorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new AccountConnector in a given project and location.
+     * 
+ */ + public void createAccountConnector( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAccountConnectorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single AccountConnector.
+     * 
+ */ + public void updateAccountConnector( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAccountConnectorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single AccountConnector.
+     * 
+ */ + public void deleteAccountConnector( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAccountConnectorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches OAuth access token based on end user credentials.
+     * 
+ */ + public void fetchAccessToken( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchAccessTokenMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Users in a given project, location, and account_connector.
+     * 
+ */ + public void listUsers( + com.google.cloud.developerconnect.v1.ListUsersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUsersMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a single User.
+     * 
+ */ + public void deleteUser( + com.google.cloud.developerconnect.v1.DeleteUserRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteUserMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Fetch the User based on the user credentials.
+     * 
+ */ + public void fetchSelf( + com.google.cloud.developerconnect.v1.FetchSelfRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchSelfMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Delete the User based on the user credentials.
+     * 
+ */ + public void deleteSelf( + com.google.cloud.developerconnect.v1.DeleteSelfRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSelfMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -1457,37 +2230,167 @@ public com.google.cloud.developerconnect.v1.FetchReadTokenResponse fetchReadToke fetchLinkableGitRepositories( com.google.cloud.developerconnect.v1.FetchLinkableGitRepositoriesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getFetchLinkableGitRepositoriesMethod(), getCallOptions(), request); + getChannel(), getFetchLinkableGitRepositoriesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * FetchGitHubInstallations returns the list of GitHub Installations that
+     * are available to be added to a Connection.
+     * For github.com, only installations accessible to the authorizer token
+     * are returned. For GitHub Enterprise, all installations are returned.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse + fetchGitHubInstallations( + com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchGitHubInstallationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch the list of branches or tags for a given repository.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.FetchGitRefsResponse fetchGitRefs( + com.google.cloud.developerconnect.v1.FetchGitRefsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchGitRefsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AccountConnectors in a given project and location.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse listAccountConnectors( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAccountConnectorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single AccountConnector.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AccountConnector in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAccountConnector( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AccountConnector.
+     * 
+ */ + public com.google.longrunning.Operation updateAccountConnector( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single AccountConnector.
+     * 
+ */ + public com.google.longrunning.Operation deleteAccountConnector( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches OAuth access token based on end user credentials.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.FetchAccessTokenResponse fetchAccessToken( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchAccessTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Users in a given project, location, and account_connector.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListUsersResponse listUsers( + com.google.cloud.developerconnect.v1.ListUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUsersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single User.
+     * 
+ */ + public com.google.longrunning.Operation deleteUser( + com.google.cloud.developerconnect.v1.DeleteUserRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteUserMethod(), getCallOptions(), request); } /** * * *
-     * FetchGitHubInstallations returns the list of GitHub Installations that
-     * are available to be added to a Connection.
-     * For github.com, only installations accessible to the authorizer token
-     * are returned. For GitHub Enterprise, all installations are returned.
+     * Fetch the User based on the user credentials.
      * 
*/ - public com.google.cloud.developerconnect.v1.FetchGitHubInstallationsResponse - fetchGitHubInstallations( - com.google.cloud.developerconnect.v1.FetchGitHubInstallationsRequest request) { + public com.google.cloud.developerconnect.v1.User fetchSelf( + com.google.cloud.developerconnect.v1.FetchSelfRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getFetchGitHubInstallationsMethod(), getCallOptions(), request); + getChannel(), getFetchSelfMethod(), getCallOptions(), request); } /** * * *
-     * Fetch the list of branches or tags for a given repository.
+     * Delete the User based on the user credentials.
      * 
*/ - public com.google.cloud.developerconnect.v1.FetchGitRefsResponse fetchGitRefs( - com.google.cloud.developerconnect.v1.FetchGitRefsRequest request) { + public com.google.longrunning.Operation deleteSelf( + com.google.cloud.developerconnect.v1.DeleteSelfRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getFetchGitRefsMethod(), getCallOptions(), request); + getChannel(), getDeleteSelfMethod(), getCallOptions(), request); } } @@ -1702,6 +2605,136 @@ public com.google.cloud.developerconnect.v1.FetchGitRefsResponse fetchGitRefs( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFetchGitRefsMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Lists AccountConnectors in a given project and location.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse listAccountConnectors( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAccountConnectorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single AccountConnector.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new AccountConnector in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAccountConnector( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AccountConnector.
+     * 
+ */ + public com.google.longrunning.Operation updateAccountConnector( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single AccountConnector.
+     * 
+ */ + public com.google.longrunning.Operation deleteAccountConnector( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAccountConnectorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches OAuth access token based on end user credentials.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.FetchAccessTokenResponse fetchAccessToken( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchAccessTokenMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Users in a given project, location, and account_connector.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListUsersResponse listUsers( + com.google.cloud.developerconnect.v1.ListUsersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUsersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single User.
+     * 
+ */ + public com.google.longrunning.Operation deleteUser( + com.google.cloud.developerconnect.v1.DeleteUserRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteUserMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetch the User based on the user credentials.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.User fetchSelf( + com.google.cloud.developerconnect.v1.FetchSelfRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchSelfMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete the User based on the user credentials.
+     * 
+ */ + public com.google.longrunning.Operation deleteSelf( + com.google.cloud.developerconnect.v1.DeleteSelfRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSelfMethod(), getCallOptions(), request); + } } /** @@ -1928,6 +2961,146 @@ protected DeveloperConnectFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFetchGitRefsMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Lists AccountConnectors in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse> + listAccountConnectors( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAccountConnectorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single AccountConnector.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.AccountConnector> + getAccountConnector( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAccountConnectorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new AccountConnector in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAccountConnector( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAccountConnectorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single AccountConnector.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAccountConnector( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAccountConnectorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single AccountConnector.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAccountConnector( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAccountConnectorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches OAuth access token based on end user credentials.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse> + fetchAccessToken(com.google.cloud.developerconnect.v1.FetchAccessTokenRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchAccessTokenMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Users in a given project, location, and account_connector.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.ListUsersResponse> + listUsers(com.google.cloud.developerconnect.v1.ListUsersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUsersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single User.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteUser(com.google.cloud.developerconnect.v1.DeleteUserRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteUserMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetch the User based on the user credentials.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.User> + fetchSelf(com.google.cloud.developerconnect.v1.FetchSelfRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchSelfMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete the User based on the user credentials.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteSelf(com.google.cloud.developerconnect.v1.DeleteSelfRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSelfMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_CONNECTIONS = 0; @@ -1944,6 +3117,16 @@ protected DeveloperConnectFutureStub build( private static final int METHODID_FETCH_LINKABLE_GIT_REPOSITORIES = 11; private static final int METHODID_FETCH_GIT_HUB_INSTALLATIONS = 12; private static final int METHODID_FETCH_GIT_REFS = 13; + private static final int METHODID_LIST_ACCOUNT_CONNECTORS = 14; + private static final int METHODID_GET_ACCOUNT_CONNECTOR = 15; + private static final int METHODID_CREATE_ACCOUNT_CONNECTOR = 16; + private static final int METHODID_UPDATE_ACCOUNT_CONNECTOR = 17; + private static final int METHODID_DELETE_ACCOUNT_CONNECTOR = 18; + private static final int METHODID_FETCH_ACCESS_TOKEN = 19; + private static final int METHODID_LIST_USERS = 20; + private static final int METHODID_DELETE_USER = 21; + private static final int METHODID_FETCH_SELF = 22; + private static final int METHODID_DELETE_SELF = 23; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2048,6 +3231,63 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.developerconnect.v1.FetchGitRefsResponse>) responseObserver); break; + case METHODID_LIST_ACCOUNT_CONNECTORS: + serviceImpl.listAccountConnectors( + (com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse>) + responseObserver); + break; + case METHODID_GET_ACCOUNT_CONNECTOR: + serviceImpl.getAccountConnector( + (com.google.cloud.developerconnect.v1.GetAccountConnectorRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ACCOUNT_CONNECTOR: + serviceImpl.createAccountConnector( + (com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ACCOUNT_CONNECTOR: + serviceImpl.updateAccountConnector( + (com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ACCOUNT_CONNECTOR: + serviceImpl.deleteAccountConnector( + (com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_ACCESS_TOKEN: + serviceImpl.fetchAccessToken( + (com.google.cloud.developerconnect.v1.FetchAccessTokenRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse>) + responseObserver); + break; + case METHODID_LIST_USERS: + serviceImpl.listUsers( + (com.google.cloud.developerconnect.v1.ListUsersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_USER: + serviceImpl.deleteUser( + (com.google.cloud.developerconnect.v1.DeleteUserRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_SELF: + serviceImpl.fetchSelf( + (com.google.cloud.developerconnect.v1.FetchSelfRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SELF: + serviceImpl.deleteSelf( + (com.google.cloud.developerconnect.v1.DeleteSelfRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -2161,6 +3401,70 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.developerconnect.v1.FetchGitRefsRequest, com.google.cloud.developerconnect.v1.FetchGitRefsResponse>( service, METHODID_FETCH_GIT_REFS))) + .addMethod( + getListAccountConnectorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse>( + service, METHODID_LIST_ACCOUNT_CONNECTORS))) + .addMethod( + getGetAccountConnectorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest, + com.google.cloud.developerconnect.v1.AccountConnector>( + service, METHODID_GET_ACCOUNT_CONNECTOR))) + .addMethod( + getCreateAccountConnectorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ACCOUNT_CONNECTOR))) + .addMethod( + getUpdateAccountConnectorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ACCOUNT_CONNECTOR))) + .addMethod( + getDeleteAccountConnectorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_ACCOUNT_CONNECTOR))) + .addMethod( + getFetchAccessTokenMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse>( + service, METHODID_FETCH_ACCESS_TOKEN))) + .addMethod( + getListUsersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.ListUsersRequest, + com.google.cloud.developerconnect.v1.ListUsersResponse>( + service, METHODID_LIST_USERS))) + .addMethod( + getDeleteUserMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.DeleteUserRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_USER))) + .addMethod( + getFetchSelfMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.FetchSelfRequest, + com.google.cloud.developerconnect.v1.User>(service, METHODID_FETCH_SELF))) + .addMethod( + getDeleteSelfMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.DeleteSelfRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_SELF))) .build(); } @@ -2226,6 +3530,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getFetchLinkableGitRepositoriesMethod()) .addMethod(getFetchGitHubInstallationsMethod()) .addMethod(getFetchGitRefsMethod()) + .addMethod(getListAccountConnectorsMethod()) + .addMethod(getGetAccountConnectorMethod()) + .addMethod(getCreateAccountConnectorMethod()) + .addMethod(getUpdateAccountConnectorMethod()) + .addMethod(getDeleteAccountConnectorMethod()) + .addMethod(getFetchAccessTokenMethod()) + .addMethod(getListUsersMethod()) + .addMethod(getDeleteUserMethod()) + .addMethod(getFetchSelfMethod()) + .addMethod(getDeleteSelfMethod()) .build(); } } diff --git a/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceGrpc.java b/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceGrpc.java new file mode 100644 index 000000000000..7fa31899dd5c --- /dev/null +++ b/java-developerconnect/grpc-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigServiceGrpc.java @@ -0,0 +1,1021 @@ +/* + * 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.developerconnect.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Creates and manages InsightsConfigs.
+ * The InsightsConfig resource is the core configuration object to capture
+ * events from your Software Development Lifecycle. It acts as the central hub
+ * for managing how Developer connect understands your application, its runtime
+ * environments, and the artifacts deployed within them.
+ * A user can create an InsightsConfig, list previously-requested
+ * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+ * the InsightsConfig.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/developerconnect/v1/insights_config.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class InsightsConfigServiceGrpc { + + private InsightsConfigServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.developerconnect.v1.InsightsConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + getListInsightsConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListInsightsConfigs", + requestType = com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.class, + responseType = com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + getListInsightsConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + getListInsightsConfigsMethod; + if ((getListInsightsConfigsMethod = InsightsConfigServiceGrpc.getListInsightsConfigsMethod) + == null) { + synchronized (InsightsConfigServiceGrpc.class) { + if ((getListInsightsConfigsMethod = InsightsConfigServiceGrpc.getListInsightsConfigsMethod) + == null) { + InsightsConfigServiceGrpc.getListInsightsConfigsMethod = + getListInsightsConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListInsightsConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new InsightsConfigServiceMethodDescriptorSupplier("ListInsightsConfigs")) + .build(); + } + } + } + return getListInsightsConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest, + com.google.longrunning.Operation> + getCreateInsightsConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateInsightsConfig", + requestType = com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest, + com.google.longrunning.Operation> + getCreateInsightsConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest, + com.google.longrunning.Operation> + getCreateInsightsConfigMethod; + if ((getCreateInsightsConfigMethod = InsightsConfigServiceGrpc.getCreateInsightsConfigMethod) + == null) { + synchronized (InsightsConfigServiceGrpc.class) { + if ((getCreateInsightsConfigMethod = + InsightsConfigServiceGrpc.getCreateInsightsConfigMethod) + == null) { + InsightsConfigServiceGrpc.getCreateInsightsConfigMethod = + getCreateInsightsConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateInsightsConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new InsightsConfigServiceMethodDescriptorSupplier("CreateInsightsConfig")) + .build(); + } + } + } + return getCreateInsightsConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest, + com.google.cloud.developerconnect.v1.InsightsConfig> + getGetInsightsConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetInsightsConfig", + requestType = com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.class, + responseType = com.google.cloud.developerconnect.v1.InsightsConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest, + com.google.cloud.developerconnect.v1.InsightsConfig> + getGetInsightsConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest, + com.google.cloud.developerconnect.v1.InsightsConfig> + getGetInsightsConfigMethod; + if ((getGetInsightsConfigMethod = InsightsConfigServiceGrpc.getGetInsightsConfigMethod) + == null) { + synchronized (InsightsConfigServiceGrpc.class) { + if ((getGetInsightsConfigMethod = InsightsConfigServiceGrpc.getGetInsightsConfigMethod) + == null) { + InsightsConfigServiceGrpc.getGetInsightsConfigMethod = + getGetInsightsConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInsightsConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.InsightsConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new InsightsConfigServiceMethodDescriptorSupplier("GetInsightsConfig")) + .build(); + } + } + } + return getGetInsightsConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest, + com.google.longrunning.Operation> + getUpdateInsightsConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateInsightsConfig", + requestType = com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest, + com.google.longrunning.Operation> + getUpdateInsightsConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest, + com.google.longrunning.Operation> + getUpdateInsightsConfigMethod; + if ((getUpdateInsightsConfigMethod = InsightsConfigServiceGrpc.getUpdateInsightsConfigMethod) + == null) { + synchronized (InsightsConfigServiceGrpc.class) { + if ((getUpdateInsightsConfigMethod = + InsightsConfigServiceGrpc.getUpdateInsightsConfigMethod) + == null) { + InsightsConfigServiceGrpc.getUpdateInsightsConfigMethod = + getUpdateInsightsConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateInsightsConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new InsightsConfigServiceMethodDescriptorSupplier("UpdateInsightsConfig")) + .build(); + } + } + } + return getUpdateInsightsConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest, + com.google.longrunning.Operation> + getDeleteInsightsConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteInsightsConfig", + requestType = com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest, + com.google.longrunning.Operation> + getDeleteInsightsConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest, + com.google.longrunning.Operation> + getDeleteInsightsConfigMethod; + if ((getDeleteInsightsConfigMethod = InsightsConfigServiceGrpc.getDeleteInsightsConfigMethod) + == null) { + synchronized (InsightsConfigServiceGrpc.class) { + if ((getDeleteInsightsConfigMethod = + InsightsConfigServiceGrpc.getDeleteInsightsConfigMethod) + == null) { + InsightsConfigServiceGrpc.getDeleteInsightsConfigMethod = + getDeleteInsightsConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteInsightsConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new InsightsConfigServiceMethodDescriptorSupplier("DeleteInsightsConfig")) + .build(); + } + } + } + return getDeleteInsightsConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static InsightsConfigServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InsightsConfigServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceStub(channel, callOptions); + } + }; + return InsightsConfigServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static InsightsConfigServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InsightsConfigServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceBlockingV2Stub(channel, callOptions); + } + }; + return InsightsConfigServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static InsightsConfigServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InsightsConfigServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceBlockingStub(channel, callOptions); + } + }; + return InsightsConfigServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static InsightsConfigServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public InsightsConfigServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceFutureStub(channel, callOptions); + } + }; + return InsightsConfigServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists InsightsConfigs in a given project and location.
+     * 
+ */ + default void listInsightsConfigs( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListInsightsConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new InsightsConfig in a given project and location.
+     * 
+ */ + default void createInsightsConfig( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateInsightsConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Insight.
+     * 
+ */ + default void getInsightsConfig( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetInsightsConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single InsightsConfig.
+     * 
+ */ + default void updateInsightsConfig( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateInsightsConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete a single Insight.
+     * 
+ */ + default void deleteInsightsConfig( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteInsightsConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service InsightsConfigService. + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public abstract static class InsightsConfigServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return InsightsConfigServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service InsightsConfigService. + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public static final class InsightsConfigServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private InsightsConfigServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InsightsConfigServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists InsightsConfigs in a given project and location.
+     * 
+ */ + public void listInsightsConfigs( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListInsightsConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new InsightsConfig in a given project and location.
+     * 
+ */ + public void createInsightsConfig( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateInsightsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Insight.
+     * 
+ */ + public void getInsightsConfig( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetInsightsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single InsightsConfig.
+     * 
+ */ + public void updateInsightsConfig( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateInsightsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete a single Insight.
+     * 
+ */ + public void deleteInsightsConfig( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteInsightsConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service InsightsConfigService. + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public static final class InsightsConfigServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private InsightsConfigServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InsightsConfigServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists InsightsConfigs in a given project and location.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse listInsightsConfigs( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInsightsConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new InsightsConfig in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInsightsConfig( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Insight.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single InsightsConfig.
+     * 
+ */ + public com.google.longrunning.Operation updateInsightsConfig( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a single Insight.
+     * 
+ */ + public com.google.longrunning.Operation deleteInsightsConfig( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInsightsConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service InsightsConfigService. + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public static final class InsightsConfigServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private InsightsConfigServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InsightsConfigServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists InsightsConfigs in a given project and location.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse listInsightsConfigs( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListInsightsConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new InsightsConfig in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createInsightsConfig( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Insight.
+     * 
+ */ + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single InsightsConfig.
+     * 
+ */ + public com.google.longrunning.Operation updateInsightsConfig( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateInsightsConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete a single Insight.
+     * 
+ */ + public com.google.longrunning.Operation deleteInsightsConfig( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteInsightsConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * InsightsConfigService. + * + *
+   * Creates and manages InsightsConfigs.
+   * The InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * A user can create an InsightsConfig, list previously-requested
+   * InsightsConfigs or get InsightsConfigs by their ID to determine the status of
+   * the InsightsConfig.
+   * 
+ */ + public static final class InsightsConfigServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private InsightsConfigServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected InsightsConfigServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new InsightsConfigServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists InsightsConfigs in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse> + listInsightsConfigs( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListInsightsConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new InsightsConfig in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInsightsConfig( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateInsightsConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Insight.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.developerconnect.v1.InsightsConfig> + getInsightsConfig(com.google.cloud.developerconnect.v1.GetInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetInsightsConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single InsightsConfig.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateInsightsConfig( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateInsightsConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete a single Insight.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInsightsConfig( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteInsightsConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_INSIGHTS_CONFIGS = 0; + private static final int METHODID_CREATE_INSIGHTS_CONFIG = 1; + private static final int METHODID_GET_INSIGHTS_CONFIG = 2; + private static final int METHODID_UPDATE_INSIGHTS_CONFIG = 3; + private static final int METHODID_DELETE_INSIGHTS_CONFIG = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_INSIGHTS_CONFIGS: + serviceImpl.listInsightsConfigs( + (com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse>) + responseObserver); + break; + case METHODID_CREATE_INSIGHTS_CONFIG: + serviceImpl.createInsightsConfig( + (com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSIGHTS_CONFIG: + serviceImpl.getInsightsConfig( + (com.google.cloud.developerconnect.v1.GetInsightsConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_INSIGHTS_CONFIG: + serviceImpl.updateInsightsConfig( + (com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_INSIGHTS_CONFIG: + serviceImpl.deleteInsightsConfig( + (com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListInsightsConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse>( + service, METHODID_LIST_INSIGHTS_CONFIGS))) + .addMethod( + getCreateInsightsConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_INSIGHTS_CONFIG))) + .addMethod( + getGetInsightsConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest, + com.google.cloud.developerconnect.v1.InsightsConfig>( + service, METHODID_GET_INSIGHTS_CONFIG))) + .addMethod( + getUpdateInsightsConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_INSIGHTS_CONFIG))) + .addMethod( + getDeleteInsightsConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_INSIGHTS_CONFIG))) + .build(); + } + + private abstract static class InsightsConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + InsightsConfigServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("InsightsConfigService"); + } + } + + private static final class InsightsConfigServiceFileDescriptorSupplier + extends InsightsConfigServiceBaseDescriptorSupplier { + InsightsConfigServiceFileDescriptorSupplier() {} + } + + private static final class InsightsConfigServiceMethodDescriptorSupplier + extends InsightsConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + InsightsConfigServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (InsightsConfigServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new InsightsConfigServiceFileDescriptorSupplier()) + .addMethod(getListInsightsConfigsMethod()) + .addMethod(getCreateInsightsConfigMethod()) + .addMethod(getGetInsightsConfigMethod()) + .addMethod(getUpdateInsightsConfigMethod()) + .addMethod(getDeleteInsightsConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnector.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnector.java new file mode 100644 index 000000000000..b721f66f1c20 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnector.java @@ -0,0 +1,2730 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * AccountConnector encapsulates what a platform administrator needs to
+ * configure for users to connect to the service providers, which includes,
+ * among other fields, the OAuth client ID, client secret, and authorization and
+ * token endpoints.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.AccountConnector} + */ +public final class AccountConnector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.AccountConnector) + AccountConnectorOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AccountConnector.newBuilder() to construct. + private AccountConnector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccountConnector() { + name_ = ""; + etag_ = ""; + oauthStartUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccountConnector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetAnnotations(); + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.AccountConnector.class, + com.google.cloud.developerconnect.v1.AccountConnector.Builder.class); + } + + private int bitField0_; + private int accountConnectorConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object accountConnectorConfig_; + + public enum AccountConnectorConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROVIDER_OAUTH_CONFIG(5), + ACCOUNTCONNECTORCONFIG_NOT_SET(0); + private final int value; + + private AccountConnectorConfigCase(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 AccountConnectorConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AccountConnectorConfigCase forNumber(int value) { + switch (value) { + case 5: + return PROVIDER_OAUTH_CONFIG; + case 0: + return ACCOUNTCONNECTORCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AccountConnectorConfigCase getAccountConnectorConfigCase() { + return AccountConnectorConfigCase.forNumber(accountConnectorConfigCase_); + } + + public static final int PROVIDER_OAUTH_CONFIG_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return Whether the providerOauthConfig field is set. + */ + @java.lang.Override + public boolean hasProviderOauthConfig() { + return accountConnectorConfigCase_ == 5; + } + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return The providerOauthConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig getProviderOauthConfig() { + if (accountConnectorConfigCase_ == 5) { + return (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_; + } + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder + getProviderOauthConfigOrBuilder() { + if (accountConnectorConfigCase_ == 5) { + return (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_; + } + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The resource name of the accountConnector, in the format
+   * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+   * 
+ * + * 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 resource name of the accountConnector, in the format
+   * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 6; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OAUTH_START_URI_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object oauthStartUri_ = ""; + + /** + * + * + *
+   * Output only. Start OAuth flow by clicking on this URL.
+   * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauthStartUri. + */ + @java.lang.Override + public java.lang.String getOauthStartUri() { + java.lang.Object ref = oauthStartUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthStartUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Start OAuth flow by clicking on this URL.
+   * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauthStartUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOauthStartUriBytes() { + java.lang.Object ref = oauthStartUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthStartUri_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (accountConnectorConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, etag_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthStartUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, oauthStartUri_); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (accountConnectorConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, annotations__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, etag_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(oauthStartUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, oauthStartUri_); + } + 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.developerconnect.v1.AccountConnector)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.AccountConnector other = + (com.google.cloud.developerconnect.v1.AccountConnector) obj; + + if (!getName().equals(other.getName())) 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 (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getOauthStartUri().equals(other.getOauthStartUri())) return false; + if (!getAccountConnectorConfigCase().equals(other.getAccountConnectorConfigCase())) + return false; + switch (accountConnectorConfigCase_) { + case 5: + if (!getProviderOauthConfig().equals(other.getProviderOauthConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + OAUTH_START_URI_FIELD_NUMBER; + hash = (53 * hash) + getOauthStartUri().hashCode(); + switch (accountConnectorConfigCase_) { + case 5: + hash = (37 * hash) + PROVIDER_OAUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getProviderOauthConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector 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.developerconnect.v1.AccountConnector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + 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.developerconnect.v1.AccountConnector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + java.io.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.developerconnect.v1.AccountConnector parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseDelimitedFrom( + java.io.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.developerconnect.v1.AccountConnector parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.AccountConnector prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AccountConnector encapsulates what a platform administrator needs to
+   * configure for users to connect to the service providers, which includes,
+   * among other fields, the OAuth client ID, client secret, and authorization and
+   * token endpoints.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.AccountConnector} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.AccountConnector) + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetAnnotations(); + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableAnnotations(); + case 8: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.AccountConnector.class, + com.google.cloud.developerconnect.v1.AccountConnector.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.AccountConnector.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (providerOauthConfigBuilder_ != null) { + providerOauthConfigBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableAnnotations().clear(); + etag_ = ""; + internalGetMutableLabels().clear(); + oauthStartUri_ = ""; + accountConnectorConfigCase_ = 0; + accountConnectorConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector build() { + com.google.cloud.developerconnect.v1.AccountConnector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector buildPartial() { + com.google.cloud.developerconnect.v1.AccountConnector result = + new com.google.cloud.developerconnect.v1.AccountConnector(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.AccountConnector result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.oauthStartUri_ = oauthStartUri_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.developerconnect.v1.AccountConnector result) { + result.accountConnectorConfigCase_ = accountConnectorConfigCase_; + result.accountConnectorConfig_ = this.accountConnectorConfig_; + if (accountConnectorConfigCase_ == 5 && providerOauthConfigBuilder_ != null) { + result.accountConnectorConfig_ = providerOauthConfigBuilder_.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.developerconnect.v1.AccountConnector) { + return mergeFrom((com.google.cloud.developerconnect.v1.AccountConnector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.AccountConnector other) { + if (other == com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000010; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getOauthStartUri().isEmpty()) { + oauthStartUri_ = other.oauthStartUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + switch (other.getAccountConnectorConfigCase()) { + case PROVIDER_OAUTH_CONFIG: + { + mergeProviderOauthConfig(other.getProviderOauthConfig()); + break; + } + case ACCOUNTCONNECTORCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 42: + { + input.readMessage( + getProviderOauthConfigFieldBuilder().getBuilder(), extensionRegistry); + accountConnectorConfigCase_ = 5; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 82: + { + oauthStartUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + 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 accountConnectorConfigCase_ = 0; + private java.lang.Object accountConnectorConfig_; + + public AccountConnectorConfigCase getAccountConnectorConfigCase() { + return AccountConnectorConfigCase.forNumber(accountConnectorConfigCase_); + } + + public Builder clearAccountConnectorConfig() { + accountConnectorConfigCase_ = 0; + accountConnectorConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ProviderOAuthConfig, + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder, + com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder> + providerOauthConfigBuilder_; + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return Whether the providerOauthConfig field is set. + */ + @java.lang.Override + public boolean hasProviderOauthConfig() { + return accountConnectorConfigCase_ == 5; + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return The providerOauthConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig getProviderOauthConfig() { + if (providerOauthConfigBuilder_ == null) { + if (accountConnectorConfigCase_ == 5) { + return (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_; + } + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } else { + if (accountConnectorConfigCase_ == 5) { + return providerOauthConfigBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + public Builder setProviderOauthConfig( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig value) { + if (providerOauthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accountConnectorConfig_ = value; + onChanged(); + } else { + providerOauthConfigBuilder_.setMessage(value); + } + accountConnectorConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + public Builder setProviderOauthConfig( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder builderForValue) { + if (providerOauthConfigBuilder_ == null) { + accountConnectorConfig_ = builderForValue.build(); + onChanged(); + } else { + providerOauthConfigBuilder_.setMessage(builderForValue.build()); + } + accountConnectorConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + public Builder mergeProviderOauthConfig( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig value) { + if (providerOauthConfigBuilder_ == null) { + if (accountConnectorConfigCase_ == 5 + && accountConnectorConfig_ + != com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance()) { + accountConnectorConfig_ = + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.newBuilder( + (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) + accountConnectorConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + accountConnectorConfig_ = value; + } + onChanged(); + } else { + if (accountConnectorConfigCase_ == 5) { + providerOauthConfigBuilder_.mergeFrom(value); + } else { + providerOauthConfigBuilder_.setMessage(value); + } + } + accountConnectorConfigCase_ = 5; + return this; + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + public Builder clearProviderOauthConfig() { + if (providerOauthConfigBuilder_ == null) { + if (accountConnectorConfigCase_ == 5) { + accountConnectorConfigCase_ = 0; + accountConnectorConfig_ = null; + onChanged(); + } + } else { + if (accountConnectorConfigCase_ == 5) { + accountConnectorConfigCase_ = 0; + accountConnectorConfig_ = null; + } + providerOauthConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder + getProviderOauthConfigBuilder() { + return getProviderOauthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder + getProviderOauthConfigOrBuilder() { + if ((accountConnectorConfigCase_ == 5) && (providerOauthConfigBuilder_ != null)) { + return providerOauthConfigBuilder_.getMessageOrBuilder(); + } else { + if (accountConnectorConfigCase_ == 5) { + return (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_; + } + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Provider OAuth config.
+     * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ProviderOAuthConfig, + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder, + com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder> + getProviderOauthConfigFieldBuilder() { + if (providerOauthConfigBuilder_ == null) { + if (!(accountConnectorConfigCase_ == 5)) { + accountConnectorConfig_ = + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + providerOauthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ProviderOAuthConfig, + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder, + com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder>( + (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) accountConnectorConfig_, + getParentForChildren(), + isClean()); + accountConnectorConfig_ = null; + } + accountConnectorConfigCase_ = 5; + onChanged(); + return providerOauthConfigBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the accountConnector, in the format
+     * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+     * 
+ * + * 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 resource name of the accountConnector, in the format
+     * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+     * 
+ * + * 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 resource name of the accountConnector, in the format
+     * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the accountConnector, in the format
+     * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The resource name of the accountConnector, in the format
+     * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+     * 
+ * + * 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_ |= 0x00000002; + 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 timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the accountConnector was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the accountConnector was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000010; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Allows users to store small amounts of arbitrary data.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Optional. Labels as key value pairs
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object oauthStartUri_ = ""; + + /** + * + * + *
+     * Output only. Start OAuth flow by clicking on this URL.
+     * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauthStartUri. + */ + public java.lang.String getOauthStartUri() { + java.lang.Object ref = oauthStartUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + oauthStartUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Start OAuth flow by clicking on this URL.
+     * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauthStartUri. + */ + public com.google.protobuf.ByteString getOauthStartUriBytes() { + java.lang.Object ref = oauthStartUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + oauthStartUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Start OAuth flow by clicking on this URL.
+     * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The oauthStartUri to set. + * @return This builder for chaining. + */ + public Builder setOauthStartUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oauthStartUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Start OAuth flow by clicking on this URL.
+     * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearOauthStartUri() { + oauthStartUri_ = getDefaultInstance().getOauthStartUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Start OAuth flow by clicking on this URL.
+     * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for oauthStartUri to set. + * @return This builder for chaining. + */ + public Builder setOauthStartUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oauthStartUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.AccountConnector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.AccountConnector) + private static final com.google.cloud.developerconnect.v1.AccountConnector DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.AccountConnector(); + } + + public static com.google.cloud.developerconnect.v1.AccountConnector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountConnector 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.developerconnect.v1.AccountConnector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorName.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorName.java new file mode 100644 index 000000000000..3bccb251f7cb --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorName.java @@ -0,0 +1,227 @@ +/* + * 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.developerconnect.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 AccountConnectorName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ACCOUNT_CONNECTOR = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/accountConnectors/{account_connector}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String accountConnector; + + @Deprecated + protected AccountConnectorName() { + project = null; + location = null; + accountConnector = null; + } + + private AccountConnectorName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + accountConnector = Preconditions.checkNotNull(builder.getAccountConnector()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAccountConnector() { + return accountConnector; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AccountConnectorName of(String project, String location, String accountConnector) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAccountConnector(accountConnector) + .build(); + } + + public static String format(String project, String location, String accountConnector) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAccountConnector(accountConnector) + .build() + .toString(); + } + + public static AccountConnectorName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ACCOUNT_CONNECTOR.validatedMatch( + formattedString, "AccountConnectorName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("account_connector")); + } + + 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 (AccountConnectorName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ACCOUNT_CONNECTOR.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 (accountConnector != null) { + fieldMapBuilder.put("account_connector", accountConnector); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ACCOUNT_CONNECTOR.instantiate( + "project", project, "location", location, "account_connector", accountConnector); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AccountConnectorName that = ((AccountConnectorName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.accountConnector, that.accountConnector); + } + 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(accountConnector); + return h; + } + + /** Builder for projects/{project}/locations/{location}/accountConnectors/{account_connector}. */ + public static class Builder { + private String project; + private String location; + private String accountConnector; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAccountConnector() { + return accountConnector; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAccountConnector(String accountConnector) { + this.accountConnector = accountConnector; + return this; + } + + private Builder(AccountConnectorName accountConnectorName) { + this.project = accountConnectorName.project; + this.location = accountConnectorName.location; + this.accountConnector = accountConnectorName.accountConnector; + } + + public AccountConnectorName build() { + return new AccountConnectorName(this); + } + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorOrBuilder.java new file mode 100644 index 000000000000..e340dda486bb --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AccountConnectorOrBuilder.java @@ -0,0 +1,362 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface AccountConnectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.AccountConnector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return Whether the providerOauthConfig field is set. + */ + boolean hasProviderOauthConfig(); + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + * + * @return The providerOauthConfig. + */ + com.google.cloud.developerconnect.v1.ProviderOAuthConfig getProviderOauthConfig(); + + /** + * + * + *
+   * Provider OAuth config.
+   * 
+ * + * .google.cloud.developerconnect.v1.ProviderOAuthConfig provider_oauth_config = 5; + */ + com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder + getProviderOauthConfigOrBuilder(); + + /** + * + * + *
+   * Identifier. The resource name of the accountConnector, in the format
+   * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The resource name of the accountConnector, in the format
+   * `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the accountConnector was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Allows users to store small amounts of arbitrary data.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Labels as key value pairs
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Start OAuth flow by clicking on this URL.
+   * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The oauthStartUri. + */ + java.lang.String getOauthStartUri(); + + /** + * + * + *
+   * Output only. Start OAuth flow by clicking on this URL.
+   * 
+ * + * string oauth_start_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for oauthStartUri. + */ + com.google.protobuf.ByteString getOauthStartUriBytes(); + + com.google.cloud.developerconnect.v1.AccountConnector.AccountConnectorConfigCase + getAccountConnectorConfigCase(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkload.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkload.java new file mode 100644 index 000000000000..2e808d4aea5f --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkload.java @@ -0,0 +1,1040 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * AppHubWorkload represents the App Hub Workload.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.AppHubWorkload} + */ +public final class AppHubWorkload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.AppHubWorkload) + AppHubWorkloadOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AppHubWorkload.newBuilder() to construct. + private AppHubWorkload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AppHubWorkload() { + workload_ = ""; + criticality_ = ""; + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AppHubWorkload(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_AppHubWorkload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.AppHubWorkload.class, + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder.class); + } + + public static final int WORKLOAD_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object workload_ = ""; + + /** + * + * + *
+   * Required. Output only. Immutable. The name of the App Hub Workload.
+   * Format:
+   * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+   * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workload. + */ + @java.lang.Override + public java.lang.String getWorkload() { + java.lang.Object ref = workload_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workload_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Output only. Immutable. The name of the App Hub Workload.
+   * Format:
+   * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+   * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for workload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkloadBytes() { + java.lang.Object ref = workload_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workload_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CRITICALITY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object criticality_ = ""; + + /** + * + * + *
+   * Output only. The criticality of the App Hub Workload.
+   * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The criticality. + */ + @java.lang.Override + public java.lang.String getCriticality() { + java.lang.Object ref = criticality_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + criticality_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The criticality of the App Hub Workload.
+   * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for criticality. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCriticalityBytes() { + java.lang.Object ref = criticality_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + criticality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + + /** + * + * + *
+   * Output only. The environment of the App Hub Workload.
+   * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The environment of the App Hub Workload.
+   * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = 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(workload_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, workload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(criticality_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, criticality_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, environment_); + } + 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(workload_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, workload_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(criticality_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, criticality_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, environment_); + } + 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.developerconnect.v1.AppHubWorkload)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.AppHubWorkload other = + (com.google.cloud.developerconnect.v1.AppHubWorkload) obj; + + if (!getWorkload().equals(other.getWorkload())) return false; + if (!getCriticality().equals(other.getCriticality())) return false; + if (!getEnvironment().equals(other.getEnvironment())) 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) + WORKLOAD_FIELD_NUMBER; + hash = (53 * hash) + getWorkload().hashCode(); + hash = (37 * hash) + CRITICALITY_FIELD_NUMBER; + hash = (53 * hash) + getCriticality().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload 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.developerconnect.v1.AppHubWorkload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + 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.developerconnect.v1.AppHubWorkload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + java.io.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.developerconnect.v1.AppHubWorkload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseDelimitedFrom( + java.io.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.developerconnect.v1.AppHubWorkload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.AppHubWorkload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * AppHubWorkload represents the App Hub Workload.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.AppHubWorkload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.AppHubWorkload) + com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_AppHubWorkload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.AppHubWorkload.class, + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.AppHubWorkload.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + workload_ = ""; + criticality_ = ""; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkload getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkload build() { + com.google.cloud.developerconnect.v1.AppHubWorkload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkload buildPartial() { + com.google.cloud.developerconnect.v1.AppHubWorkload result = + new com.google.cloud.developerconnect.v1.AppHubWorkload(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.AppHubWorkload result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.workload_ = workload_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.criticality_ = criticality_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.AppHubWorkload) { + return mergeFrom((com.google.cloud.developerconnect.v1.AppHubWorkload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.AppHubWorkload other) { + if (other == com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance()) + return this; + if (!other.getWorkload().isEmpty()) { + workload_ = other.workload_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCriticality().isEmpty()) { + criticality_ = other.criticality_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + 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: + { + workload_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + criticality_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + environment_ = 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 workload_ = ""; + + /** + * + * + *
+     * Required. Output only. Immutable. The name of the App Hub Workload.
+     * Format:
+     * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+     * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workload. + */ + public java.lang.String getWorkload() { + java.lang.Object ref = workload_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workload_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Output only. Immutable. The name of the App Hub Workload.
+     * Format:
+     * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+     * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for workload. + */ + public com.google.protobuf.ByteString getWorkloadBytes() { + java.lang.Object ref = workload_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workload_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Output only. Immutable. The name of the App Hub Workload.
+     * Format:
+     * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+     * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The workload to set. + * @return This builder for chaining. + */ + public Builder setWorkload(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + workload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Output only. Immutable. The name of the App Hub Workload.
+     * Format:
+     * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+     * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearWorkload() { + workload_ = getDefaultInstance().getWorkload(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Output only. Immutable. The name of the App Hub Workload.
+     * Format:
+     * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+     * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for workload to set. + * @return This builder for chaining. + */ + public Builder setWorkloadBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workload_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object criticality_ = ""; + + /** + * + * + *
+     * Output only. The criticality of the App Hub Workload.
+     * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The criticality. + */ + public java.lang.String getCriticality() { + java.lang.Object ref = criticality_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + criticality_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The criticality of the App Hub Workload.
+     * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for criticality. + */ + public com.google.protobuf.ByteString getCriticalityBytes() { + java.lang.Object ref = criticality_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + criticality_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The criticality of the App Hub Workload.
+     * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The criticality to set. + * @return This builder for chaining. + */ + public Builder setCriticality(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + criticality_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The criticality of the App Hub Workload.
+     * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCriticality() { + criticality_ = getDefaultInstance().getCriticality(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The criticality of the App Hub Workload.
+     * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for criticality to set. + * @return This builder for chaining. + */ + public Builder setCriticalityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + criticality_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object environment_ = ""; + + /** + * + * + *
+     * Output only. The environment of the App Hub Workload.
+     * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The environment of the App Hub Workload.
+     * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The environment of the App Hub Workload.
+     * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The environment of the App Hub Workload.
+     * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The environment of the App Hub Workload.
+     * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = 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.developerconnect.v1.AppHubWorkload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.AppHubWorkload) + private static final com.google.cloud.developerconnect.v1.AppHubWorkload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.AppHubWorkload(); + } + + public static com.google.cloud.developerconnect.v1.AppHubWorkload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AppHubWorkload 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.developerconnect.v1.AppHubWorkload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkloadOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkloadOrBuilder.java new file mode 100644 index 000000000000..7fd570533f12 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/AppHubWorkloadOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface AppHubWorkloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.AppHubWorkload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Output only. Immutable. The name of the App Hub Workload.
+   * Format:
+   * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+   * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The workload. + */ + java.lang.String getWorkload(); + + /** + * + * + *
+   * Required. Output only. Immutable. The name of the App Hub Workload.
+   * Format:
+   * `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`.
+   * 
+ * + * + * string workload = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for workload. + */ + com.google.protobuf.ByteString getWorkloadBytes(); + + /** + * + * + *
+   * Output only. The criticality of the App Hub Workload.
+   * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The criticality. + */ + java.lang.String getCriticality(); + + /** + * + * + *
+   * Output only. The criticality of the App Hub Workload.
+   * 
+ * + * string criticality = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for criticality. + */ + com.google.protobuf.ByteString getCriticalityBytes(); + + /** + * + * + *
+   * Output only. The environment of the App Hub Workload.
+   * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + + /** + * + * + *
+   * Output only. The environment of the App Hub Workload.
+   * 
+ * + * string environment = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfig.java new file mode 100644 index 000000000000..de69bb4e08c4 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfig.java @@ -0,0 +1,1518 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * The artifact config of the artifact that is deployed.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ArtifactConfig} + */ +public final class ArtifactConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ArtifactConfig) + ArtifactConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ArtifactConfig.newBuilder() to construct. + private ArtifactConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArtifactConfig() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArtifactConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ArtifactConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ArtifactConfig.class, + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder.class); + } + + private int artifactStorageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object artifactStorage_; + + public enum ArtifactStorageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GOOGLE_ARTIFACT_REGISTRY(2), + ARTIFACTSTORAGE_NOT_SET(0); + private final int value; + + private ArtifactStorageCase(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 ArtifactStorageCase valueOf(int value) { + return forNumber(value); + } + + public static ArtifactStorageCase forNumber(int value) { + switch (value) { + case 2: + return GOOGLE_ARTIFACT_REGISTRY; + case 0: + return ARTIFACTSTORAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ArtifactStorageCase getArtifactStorageCase() { + return ArtifactStorageCase.forNumber(artifactStorageCase_); + } + + private int artifactMetadataStorageCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object artifactMetadataStorage_; + + public enum ArtifactMetadataStorageCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GOOGLE_ARTIFACT_ANALYSIS(3), + ARTIFACTMETADATASTORAGE_NOT_SET(0); + private final int value; + + private ArtifactMetadataStorageCase(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 ArtifactMetadataStorageCase valueOf(int value) { + return forNumber(value); + } + + public static ArtifactMetadataStorageCase forNumber(int value) { + switch (value) { + case 3: + return GOOGLE_ARTIFACT_ANALYSIS; + case 0: + return ARTIFACTMETADATASTORAGE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ArtifactMetadataStorageCase getArtifactMetadataStorageCase() { + return ArtifactMetadataStorageCase.forNumber(artifactMetadataStorageCase_); + } + + public static final int GOOGLE_ARTIFACT_REGISTRY_FIELD_NUMBER = 2; + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactRegistry field is set. + */ + @java.lang.Override + public boolean hasGoogleArtifactRegistry() { + return artifactStorageCase_ == 2; + } + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactRegistry. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry getGoogleArtifactRegistry() { + if (artifactStorageCase_ == 2) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder + getGoogleArtifactRegistryOrBuilder() { + if (artifactStorageCase_ == 2) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + + public static final int GOOGLE_ARTIFACT_ANALYSIS_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactAnalysis field is set. + */ + @java.lang.Override + public boolean hasGoogleArtifactAnalysis() { + return artifactMetadataStorageCase_ == 3; + } + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactAnalysis. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis getGoogleArtifactAnalysis() { + if (artifactMetadataStorageCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) artifactMetadataStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder + getGoogleArtifactAnalysisOrBuilder() { + if (artifactMetadataStorageCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) artifactMetadataStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * Required. Immutable. The URI of the artifact that is deployed.
+   * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+   * The URI does not include the tag / digest because it captures a lineage of
+   * artifacts.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the artifact that is deployed.
+   * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+   * The URI does not include the tag / digest because it captures a lineage of
+   * artifacts.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (artifactStorageCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_); + } + if (artifactMetadataStorageCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) artifactMetadataStorage_); + } + 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 (artifactStorageCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_); + } + if (artifactMetadataStorageCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + artifactMetadataStorage_); + } + 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.developerconnect.v1.ArtifactConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ArtifactConfig other = + (com.google.cloud.developerconnect.v1.ArtifactConfig) obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getArtifactStorageCase().equals(other.getArtifactStorageCase())) return false; + switch (artifactStorageCase_) { + case 2: + if (!getGoogleArtifactRegistry().equals(other.getGoogleArtifactRegistry())) return false; + break; + case 0: + default: + } + if (!getArtifactMetadataStorageCase().equals(other.getArtifactMetadataStorageCase())) + return false; + switch (artifactMetadataStorageCase_) { + case 3: + if (!getGoogleArtifactAnalysis().equals(other.getGoogleArtifactAnalysis())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + switch (artifactStorageCase_) { + case 2: + hash = (37 * hash) + GOOGLE_ARTIFACT_REGISTRY_FIELD_NUMBER; + hash = (53 * hash) + getGoogleArtifactRegistry().hashCode(); + break; + case 0: + default: + } + switch (artifactMetadataStorageCase_) { + case 3: + hash = (37 * hash) + GOOGLE_ARTIFACT_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getGoogleArtifactAnalysis().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig 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.developerconnect.v1.ArtifactConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + 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.developerconnect.v1.ArtifactConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + java.io.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.developerconnect.v1.ArtifactConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.ArtifactConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ArtifactConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 artifact config of the artifact that is deployed.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ArtifactConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ArtifactConfig) + com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ArtifactConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ArtifactConfig.class, + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ArtifactConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (googleArtifactRegistryBuilder_ != null) { + googleArtifactRegistryBuilder_.clear(); + } + if (googleArtifactAnalysisBuilder_ != null) { + googleArtifactAnalysisBuilder_.clear(); + } + uri_ = ""; + artifactStorageCase_ = 0; + artifactStorage_ = null; + artifactMetadataStorageCase_ = 0; + artifactMetadataStorage_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ArtifactConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ArtifactConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ArtifactConfig build() { + com.google.cloud.developerconnect.v1.ArtifactConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ArtifactConfig buildPartial() { + com.google.cloud.developerconnect.v1.ArtifactConfig result = + new com.google.cloud.developerconnect.v1.ArtifactConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.ArtifactConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + } + } + + private void buildPartialOneofs(com.google.cloud.developerconnect.v1.ArtifactConfig result) { + result.artifactStorageCase_ = artifactStorageCase_; + result.artifactStorage_ = this.artifactStorage_; + if (artifactStorageCase_ == 2 && googleArtifactRegistryBuilder_ != null) { + result.artifactStorage_ = googleArtifactRegistryBuilder_.build(); + } + result.artifactMetadataStorageCase_ = artifactMetadataStorageCase_; + result.artifactMetadataStorage_ = this.artifactMetadataStorage_; + if (artifactMetadataStorageCase_ == 3 && googleArtifactAnalysisBuilder_ != null) { + result.artifactMetadataStorage_ = googleArtifactAnalysisBuilder_.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.developerconnect.v1.ArtifactConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.ArtifactConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.ArtifactConfig other) { + if (other == com.google.cloud.developerconnect.v1.ArtifactConfig.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getArtifactStorageCase()) { + case GOOGLE_ARTIFACT_REGISTRY: + { + mergeGoogleArtifactRegistry(other.getGoogleArtifactRegistry()); + break; + } + case ARTIFACTSTORAGE_NOT_SET: + { + break; + } + } + switch (other.getArtifactMetadataStorageCase()) { + case GOOGLE_ARTIFACT_ANALYSIS: + { + mergeGoogleArtifactAnalysis(other.getGoogleArtifactAnalysis()); + break; + } + case ARTIFACTMETADATASTORAGE_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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + getGoogleArtifactRegistryFieldBuilder().getBuilder(), extensionRegistry); + artifactStorageCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getGoogleArtifactAnalysisFieldBuilder().getBuilder(), extensionRegistry); + artifactMetadataStorageCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int artifactStorageCase_ = 0; + private java.lang.Object artifactStorage_; + + public ArtifactStorageCase getArtifactStorageCase() { + return ArtifactStorageCase.forNumber(artifactStorageCase_); + } + + public Builder clearArtifactStorage() { + artifactStorageCase_ = 0; + artifactStorage_ = null; + onChanged(); + return this; + } + + private int artifactMetadataStorageCase_ = 0; + private java.lang.Object artifactMetadataStorage_; + + public ArtifactMetadataStorageCase getArtifactMetadataStorageCase() { + return ArtifactMetadataStorageCase.forNumber(artifactMetadataStorageCase_); + } + + public Builder clearArtifactMetadataStorage() { + artifactMetadataStorageCase_ = 0; + artifactMetadataStorage_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder> + googleArtifactRegistryBuilder_; + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactRegistry field is set. + */ + @java.lang.Override + public boolean hasGoogleArtifactRegistry() { + return artifactStorageCase_ == 2; + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactRegistry. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry getGoogleArtifactRegistry() { + if (googleArtifactRegistryBuilder_ == null) { + if (artifactStorageCase_ == 2) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } else { + if (artifactStorageCase_ == 2) { + return googleArtifactRegistryBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleArtifactRegistry( + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry value) { + if (googleArtifactRegistryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifactStorage_ = value; + onChanged(); + } else { + googleArtifactRegistryBuilder_.setMessage(value); + } + artifactStorageCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleArtifactRegistry( + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder builderForValue) { + if (googleArtifactRegistryBuilder_ == null) { + artifactStorage_ = builderForValue.build(); + onChanged(); + } else { + googleArtifactRegistryBuilder_.setMessage(builderForValue.build()); + } + artifactStorageCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGoogleArtifactRegistry( + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry value) { + if (googleArtifactRegistryBuilder_ == null) { + if (artifactStorageCase_ == 2 + && artifactStorage_ + != com.google.cloud.developerconnect.v1.GoogleArtifactRegistry + .getDefaultInstance()) { + artifactStorage_ = + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.newBuilder( + (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) + artifactStorage_) + .mergeFrom(value) + .buildPartial(); + } else { + artifactStorage_ = value; + } + onChanged(); + } else { + if (artifactStorageCase_ == 2) { + googleArtifactRegistryBuilder_.mergeFrom(value); + } else { + googleArtifactRegistryBuilder_.setMessage(value); + } + } + artifactStorageCase_ = 2; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGoogleArtifactRegistry() { + if (googleArtifactRegistryBuilder_ == null) { + if (artifactStorageCase_ == 2) { + artifactStorageCase_ = 0; + artifactStorage_ = null; + onChanged(); + } + } else { + if (artifactStorageCase_ == 2) { + artifactStorageCase_ = 0; + artifactStorage_ = null; + } + googleArtifactRegistryBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder + getGoogleArtifactRegistryBuilder() { + return getGoogleArtifactRegistryFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder + getGoogleArtifactRegistryOrBuilder() { + if ((artifactStorageCase_ == 2) && (googleArtifactRegistryBuilder_ != null)) { + return googleArtifactRegistryBuilder_.getMessageOrBuilder(); + } else { + if (artifactStorageCase_ == 2) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Set if the artifact is stored in Artifact regsitry.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder> + getGoogleArtifactRegistryFieldBuilder() { + if (googleArtifactRegistryBuilder_ == null) { + if (!(artifactStorageCase_ == 2)) { + artifactStorage_ = + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + googleArtifactRegistryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder>( + (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) artifactStorage_, + getParentForChildren(), + isClean()); + artifactStorage_ = null; + } + artifactStorageCase_ = 2; + onChanged(); + return googleArtifactRegistryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder> + googleArtifactAnalysisBuilder_; + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactAnalysis field is set. + */ + @java.lang.Override + public boolean hasGoogleArtifactAnalysis() { + return artifactMetadataStorageCase_ == 3; + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactAnalysis. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis getGoogleArtifactAnalysis() { + if (googleArtifactAnalysisBuilder_ == null) { + if (artifactMetadataStorageCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + artifactMetadataStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } else { + if (artifactMetadataStorageCase_ == 3) { + return googleArtifactAnalysisBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleArtifactAnalysis( + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis value) { + if (googleArtifactAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + artifactMetadataStorage_ = value; + onChanged(); + } else { + googleArtifactAnalysisBuilder_.setMessage(value); + } + artifactMetadataStorageCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleArtifactAnalysis( + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder builderForValue) { + if (googleArtifactAnalysisBuilder_ == null) { + artifactMetadataStorage_ = builderForValue.build(); + onChanged(); + } else { + googleArtifactAnalysisBuilder_.setMessage(builderForValue.build()); + } + artifactMetadataStorageCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGoogleArtifactAnalysis( + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis value) { + if (googleArtifactAnalysisBuilder_ == null) { + if (artifactMetadataStorageCase_ == 3 + && artifactMetadataStorage_ + != com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis + .getDefaultInstance()) { + artifactMetadataStorage_ = + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.newBuilder( + (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + artifactMetadataStorage_) + .mergeFrom(value) + .buildPartial(); + } else { + artifactMetadataStorage_ = value; + } + onChanged(); + } else { + if (artifactMetadataStorageCase_ == 3) { + googleArtifactAnalysisBuilder_.mergeFrom(value); + } else { + googleArtifactAnalysisBuilder_.setMessage(value); + } + } + artifactMetadataStorageCase_ = 3; + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGoogleArtifactAnalysis() { + if (googleArtifactAnalysisBuilder_ == null) { + if (artifactMetadataStorageCase_ == 3) { + artifactMetadataStorageCase_ = 0; + artifactMetadataStorage_ = null; + onChanged(); + } + } else { + if (artifactMetadataStorageCase_ == 3) { + artifactMetadataStorageCase_ = 0; + artifactMetadataStorage_ = null; + } + googleArtifactAnalysisBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder + getGoogleArtifactAnalysisBuilder() { + return getGoogleArtifactAnalysisFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder + getGoogleArtifactAnalysisOrBuilder() { + if ((artifactMetadataStorageCase_ == 3) && (googleArtifactAnalysisBuilder_ != null)) { + return googleArtifactAnalysisBuilder_.getMessageOrBuilder(); + } else { + if (artifactMetadataStorageCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + artifactMetadataStorage_; + } + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Optional. Set if the artifact metadata is stored in Artifact analysis.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder> + getGoogleArtifactAnalysisFieldBuilder() { + if (googleArtifactAnalysisBuilder_ == null) { + if (!(artifactMetadataStorageCase_ == 3)) { + artifactMetadataStorage_ = + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + googleArtifactAnalysisBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder>( + (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + artifactMetadataStorage_, + getParentForChildren(), + isClean()); + artifactMetadataStorage_ = null; + } + artifactMetadataStorageCase_ = 3; + onChanged(); + return googleArtifactAnalysisBuilder_; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * Required. Immutable. The URI of the artifact that is deployed.
+     * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+     * The URI does not include the tag / digest because it captures a lineage of
+     * artifacts.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the artifact that is deployed.
+     * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+     * The URI does not include the tag / digest because it captures a lineage of
+     * artifacts.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the artifact that is deployed.
+     * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+     * The URI does not include the tag / digest because it captures a lineage of
+     * artifacts.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The URI of the artifact that is deployed.
+     * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+     * The URI does not include the tag / digest because it captures a lineage of
+     * artifacts.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The URI of the artifact that is deployed.
+     * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+     * The URI does not include the tag / digest because it captures a lineage of
+     * artifacts.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 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.developerconnect.v1.ArtifactConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ArtifactConfig) + private static final com.google.cloud.developerconnect.v1.ArtifactConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ArtifactConfig(); + } + + public static com.google.cloud.developerconnect.v1.ArtifactConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArtifactConfig 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.developerconnect.v1.ArtifactConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfigOrBuilder.java new file mode 100644 index 000000000000..6de3229d3778 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ArtifactConfigOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ArtifactConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ArtifactConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactRegistry field is set. + */ + boolean hasGoogleArtifactRegistry(); + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactRegistry. + */ + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry getGoogleArtifactRegistry(); + + /** + * + * + *
+   * Optional. Set if the artifact is stored in Artifact regsitry.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactRegistry google_artifact_registry = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder + getGoogleArtifactRegistryOrBuilder(); + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleArtifactAnalysis field is set. + */ + boolean hasGoogleArtifactAnalysis(); + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleArtifactAnalysis. + */ + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis getGoogleArtifactAnalysis(); + + /** + * + * + *
+   * Optional. Set if the artifact metadata is stored in Artifact analysis.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GoogleArtifactAnalysis google_artifact_analysis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder + getGoogleArtifactAnalysisOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The URI of the artifact that is deployed.
+   * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+   * The URI does not include the tag / digest because it captures a lineage of
+   * artifacts.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * Required. Immutable. The URI of the artifact that is deployed.
+   * e.g. `us-docker.pkg.dev/my-project/my-repo/image`.
+   * The URI does not include the tag / digest because it captures a lineage of
+   * artifacts.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + com.google.cloud.developerconnect.v1.ArtifactConfig.ArtifactStorageCase getArtifactStorageCase(); + + com.google.cloud.developerconnect.v1.ArtifactConfig.ArtifactMetadataStorageCase + getArtifactMetadataStorageCase(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfig.java new file mode 100644 index 000000000000..c13564d11fa1 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfig.java @@ -0,0 +1,1572 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Configuration for connections to an instance of Bitbucket Cloud.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.BitbucketCloudConfig} + */ +public final class BitbucketCloudConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.BitbucketCloudConfig) + BitbucketCloudConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BitbucketCloudConfig.newBuilder() to construct. + private BitbucketCloudConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BitbucketCloudConfig() { + workspace_ = ""; + webhookSecretSecretVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BitbucketCloudConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.class, + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder.class); + } + + private int bitField0_; + public static final int WORKSPACE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object workspace_ = ""; + + /** + * + * + *
+   * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+   * Platform.
+   * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The workspace. + */ + @java.lang.Override + public java.lang.String getWorkspace() { + java.lang.Object ref = workspace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workspace_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+   * Platform.
+   * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for workspace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkspaceBytes() { + java.lang.Object ref = workspace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workspace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBHOOK_SECRET_SECRET_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object webhookSecretSecretVersion_ = ""; + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate and create
+   * webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + @java.lang.Override + public java.lang.String getWebhookSecretSecretVersion() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretSecretVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate and create
+   * webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretSecretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_AUTHORIZER_CREDENTIAL_FIELD_NUMBER = 3; + private com.google.cloud.developerconnect.v1.UserCredential readAuthorizerCredential_; + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + @java.lang.Override + public boolean hasReadAuthorizerCredential() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential() { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder() { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + + public static final int AUTHORIZER_CREDENTIAL_FIELD_NUMBER = 4; + private com.google.cloud.developerconnect.v1.UserCredential authorizerCredential_; + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + @java.lang.Override + public boolean hasAuthorizerCredential() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential() { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getAuthorizerCredentialOrBuilder() { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(workspace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, workspace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretSecretVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, webhookSecretSecretVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getReadAuthorizerCredential()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getAuthorizerCredential()); + } + 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(workspace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, workspace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretSecretVersion_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, webhookSecretSecretVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getReadAuthorizerCredential()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAuthorizerCredential()); + } + 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.developerconnect.v1.BitbucketCloudConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.BitbucketCloudConfig other = + (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) obj; + + if (!getWorkspace().equals(other.getWorkspace())) return false; + if (!getWebhookSecretSecretVersion().equals(other.getWebhookSecretSecretVersion())) + return false; + if (hasReadAuthorizerCredential() != other.hasReadAuthorizerCredential()) return false; + if (hasReadAuthorizerCredential()) { + if (!getReadAuthorizerCredential().equals(other.getReadAuthorizerCredential())) return false; + } + if (hasAuthorizerCredential() != other.hasAuthorizerCredential()) return false; + if (hasAuthorizerCredential()) { + if (!getAuthorizerCredential().equals(other.getAuthorizerCredential())) 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) + WORKSPACE_FIELD_NUMBER; + hash = (53 * hash) + getWorkspace().hashCode(); + hash = (37 * hash) + WEBHOOK_SECRET_SECRET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getWebhookSecretSecretVersion().hashCode(); + if (hasReadAuthorizerCredential()) { + hash = (37 * hash) + READ_AUTHORIZER_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getReadAuthorizerCredential().hashCode(); + } + if (hasAuthorizerCredential()) { + hash = (37 * hash) + AUTHORIZER_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizerCredential().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig 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.developerconnect.v1.BitbucketCloudConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + 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.developerconnect.v1.BitbucketCloudConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + java.io.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.developerconnect.v1.BitbucketCloudConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.BitbucketCloudConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.BitbucketCloudConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Cloud.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.BitbucketCloudConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.BitbucketCloudConfig) + com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.class, + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.BitbucketCloudConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadAuthorizerCredentialFieldBuilder(); + getAuthorizerCredentialFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + workspace_ = ""; + webhookSecretSecretVersion_ = ""; + readAuthorizerCredential_ = null; + if (readAuthorizerCredentialBuilder_ != null) { + readAuthorizerCredentialBuilder_.dispose(); + readAuthorizerCredentialBuilder_ = null; + } + authorizerCredential_ = null; + if (authorizerCredentialBuilder_ != null) { + authorizerCredentialBuilder_.dispose(); + authorizerCredentialBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig build() { + com.google.cloud.developerconnect.v1.BitbucketCloudConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig buildPartial() { + com.google.cloud.developerconnect.v1.BitbucketCloudConfig result = + new com.google.cloud.developerconnect.v1.BitbucketCloudConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.BitbucketCloudConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.workspace_ = workspace_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.webhookSecretSecretVersion_ = webhookSecretSecretVersion_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readAuthorizerCredential_ = + readAuthorizerCredentialBuilder_ == null + ? readAuthorizerCredential_ + : readAuthorizerCredentialBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.authorizerCredential_ = + authorizerCredentialBuilder_ == null + ? authorizerCredential_ + : authorizerCredentialBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + 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.developerconnect.v1.BitbucketCloudConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.BitbucketCloudConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.BitbucketCloudConfig other) { + if (other == com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance()) + return this; + if (!other.getWorkspace().isEmpty()) { + workspace_ = other.workspace_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWebhookSecretSecretVersion().isEmpty()) { + webhookSecretSecretVersion_ = other.webhookSecretSecretVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasReadAuthorizerCredential()) { + mergeReadAuthorizerCredential(other.getReadAuthorizerCredential()); + } + if (other.hasAuthorizerCredential()) { + mergeAuthorizerCredential(other.getAuthorizerCredential()); + } + 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: + { + workspace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + webhookSecretSecretVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getReadAuthorizerCredentialFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getAuthorizerCredentialFieldBuilder().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 java.lang.Object workspace_ = ""; + + /** + * + * + *
+     * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+     * Platform.
+     * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The workspace. + */ + public java.lang.String getWorkspace() { + java.lang.Object ref = workspace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workspace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+     * Platform.
+     * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for workspace. + */ + public com.google.protobuf.ByteString getWorkspaceBytes() { + java.lang.Object ref = workspace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workspace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+     * Platform.
+     * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The workspace to set. + * @return This builder for chaining. + */ + public Builder setWorkspace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + workspace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+     * Platform.
+     * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWorkspace() { + workspace_ = getDefaultInstance().getWorkspace(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+     * Platform.
+     * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for workspace to set. + * @return This builder for chaining. + */ + public Builder setWorkspaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workspace_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object webhookSecretSecretVersion_ = ""; + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate and create
+     * webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + public java.lang.String getWebhookSecretSecretVersion() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretSecretVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate and create
+     * webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + public com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretSecretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate and create
+     * webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The webhookSecretSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretSecretVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webhookSecretSecretVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate and create
+     * webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWebhookSecretSecretVersion() { + webhookSecretSecretVersion_ = getDefaultInstance().getWebhookSecretSecretVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate and create
+     * webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for webhookSecretSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretSecretVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webhookSecretSecretVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.developerconnect.v1.UserCredential readAuthorizerCredential_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + readAuthorizerCredentialBuilder_; + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + public boolean hasReadAuthorizerCredential() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + public com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential() { + if (readAuthorizerCredentialBuilder_ == null) { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } else { + return readAuthorizerCredentialBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (readAuthorizerCredentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAuthorizerCredential_ = value; + } else { + readAuthorizerCredentialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential.Builder builderForValue) { + if (readAuthorizerCredentialBuilder_ == null) { + readAuthorizerCredential_ = builderForValue.build(); + } else { + readAuthorizerCredentialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (readAuthorizerCredentialBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && readAuthorizerCredential_ != null + && readAuthorizerCredential_ + != com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance()) { + getReadAuthorizerCredentialBuilder().mergeFrom(value); + } else { + readAuthorizerCredential_ = value; + } + } else { + readAuthorizerCredentialBuilder_.mergeFrom(value); + } + if (readAuthorizerCredential_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReadAuthorizerCredential() { + bitField0_ = (bitField0_ & ~0x00000004); + readAuthorizerCredential_ = null; + if (readAuthorizerCredentialBuilder_ != null) { + readAuthorizerCredentialBuilder_.dispose(); + readAuthorizerCredentialBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredential.Builder + getReadAuthorizerCredentialBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReadAuthorizerCredentialFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder() { + if (readAuthorizerCredentialBuilder_ != null) { + return readAuthorizerCredentialBuilder_.getMessageOrBuilder(); + } else { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository` access.
+     * It can either be a workspace, project or repository access token.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + getReadAuthorizerCredentialFieldBuilder() { + if (readAuthorizerCredentialBuilder_ == null) { + readAuthorizerCredentialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder>( + getReadAuthorizerCredential(), getParentForChildren(), isClean()); + readAuthorizerCredential_ = null; + } + return readAuthorizerCredentialBuilder_; + } + + private com.google.cloud.developerconnect.v1.UserCredential authorizerCredential_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + authorizerCredentialBuilder_; + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + public boolean hasAuthorizerCredential() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + public com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential() { + if (authorizerCredentialBuilder_ == null) { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } else { + return authorizerCredentialBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (authorizerCredentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizerCredential_ = value; + } else { + authorizerCredentialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential.Builder builderForValue) { + if (authorizerCredentialBuilder_ == null) { + authorizerCredential_ = builderForValue.build(); + } else { + authorizerCredentialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (authorizerCredentialBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && authorizerCredential_ != null + && authorizerCredential_ + != com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance()) { + getAuthorizerCredentialBuilder().mergeFrom(value); + } else { + authorizerCredential_ = value; + } + } else { + authorizerCredentialBuilder_.mergeFrom(value); + } + if (authorizerCredential_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthorizerCredential() { + bitField0_ = (bitField0_ & ~0x00000008); + authorizerCredential_ = null; + if (authorizerCredentialBuilder_ != null) { + authorizerCredentialBuilder_.dispose(); + authorizerCredentialBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredential.Builder + getAuthorizerCredentialBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAuthorizerCredentialFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getAuthorizerCredentialOrBuilder() { + if (authorizerCredentialBuilder_ != null) { + return authorizerCredentialBuilder_.getMessageOrBuilder(); + } else { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + } + + /** + * + * + *
+     * Required. An access token with the minimum `repository`, `pullrequest` and
+     * `webhook` scope access. It can either be a workspace, project or repository
+     * access token. This is needed to create webhooks. It's recommended to use a
+     * system account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + getAuthorizerCredentialFieldBuilder() { + if (authorizerCredentialBuilder_ == null) { + authorizerCredentialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder>( + getAuthorizerCredential(), getParentForChildren(), isClean()); + authorizerCredential_ = null; + } + return authorizerCredentialBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.BitbucketCloudConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.BitbucketCloudConfig) + private static final com.google.cloud.developerconnect.v1.BitbucketCloudConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.BitbucketCloudConfig(); + } + + public static com.google.cloud.developerconnect.v1.BitbucketCloudConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BitbucketCloudConfig 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.developerconnect.v1.BitbucketCloudConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfigOrBuilder.java new file mode 100644 index 000000000000..c4b3e6bcd983 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketCloudConfigOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface BitbucketCloudConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.BitbucketCloudConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+   * Platform.
+   * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The workspace. + */ + java.lang.String getWorkspace(); + + /** + * + * + *
+   * Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud
+   * Platform.
+   * 
+ * + * string workspace = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for workspace. + */ + com.google.protobuf.ByteString getWorkspaceBytes(); + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate and create
+   * webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + java.lang.String getWebhookSecretSecretVersion(); + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate and create
+   * webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + boolean hasReadAuthorizerCredential(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository` access.
+   * It can either be a workspace, project or repository access token.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + boolean hasAuthorizerCredential(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential(); + + /** + * + * + *
+   * Required. An access token with the minimum `repository`, `pullrequest` and
+   * `webhook` scope access. It can either be a workspace, project or repository
+   * access token. This is needed to create webhooks. It's recommended to use a
+   * system account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder getAuthorizerCredentialOrBuilder(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfig.java new file mode 100644 index 000000000000..3fc963bd1c3c --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfig.java @@ -0,0 +1,2297 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Configuration for connections to an instance of Bitbucket Data Center.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.BitbucketDataCenterConfig} + */ +public final class BitbucketDataCenterConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.BitbucketDataCenterConfig) + BitbucketDataCenterConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use BitbucketDataCenterConfig.newBuilder() to construct. + private BitbucketDataCenterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BitbucketDataCenterConfig() { + hostUri_ = ""; + webhookSecretSecretVersion_ = ""; + sslCaCertificate_ = ""; + serverVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BitbucketDataCenterConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.class, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder.class); + } + + private int bitField0_; + public static final int HOST_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object hostUri_ = ""; + + /** + * + * + *
+   * Required. The URI of the Bitbucket Data Center host this connection is for.
+   * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hostUri. + */ + @java.lang.Override + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The URI of the Bitbucket Data Center host this connection is for.
+   * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hostUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBHOOK_SECRET_SECRET_VERSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object webhookSecretSecretVersion_ = ""; + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + @java.lang.Override + public java.lang.String getWebhookSecretSecretVersion() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretSecretVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretSecretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int READ_AUTHORIZER_CREDENTIAL_FIELD_NUMBER = 3; + private com.google.cloud.developerconnect.v1.UserCredential readAuthorizerCredential_; + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + @java.lang.Override + public boolean hasReadAuthorizerCredential() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential() { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder() { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + + public static final int AUTHORIZER_CREDENTIAL_FIELD_NUMBER = 4; + private com.google.cloud.developerconnect.v1.UserCredential authorizerCredential_; + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + @java.lang.Override + public boolean hasAuthorizerCredential() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential() { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getAuthorizerCredentialOrBuilder() { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + + public static final int SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.developerconnect.v1.ServiceDirectoryConfig serviceDirectoryConfig_; + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + @java.lang.Override + public boolean hasServiceDirectoryConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ServiceDirectoryConfig getServiceDirectoryConfig() { + return serviceDirectoryConfig_ == null + ? com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder() { + return serviceDirectoryConfig_ == null + ? com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + + public static final int SSL_CA_CERTIFICATE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object sslCaCertificate_ = ""; + + /** + * + * + *
+   * Optional. SSL certificate authority to trust when making requests to
+   * Bitbucket Data Center.
+   * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCaCertificate. + */ + @java.lang.Override + public java.lang.String getSslCaCertificate() { + java.lang.Object ref = sslCaCertificate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sslCaCertificate_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. SSL certificate authority to trust when making requests to
+   * Bitbucket Data Center.
+   * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCaCertificate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSslCaCertificateBytes() { + java.lang.Object ref = sslCaCertificate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sslCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVER_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object serverVersion_ = ""; + + /** + * + * + *
+   * Output only. Version of the Bitbucket Data Center server running on the
+   * `host_uri`.
+   * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serverVersion. + */ + @java.lang.Override + public java.lang.String getServerVersion() { + java.lang.Object ref = serverVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverVersion_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. Version of the Bitbucket Data Center server running on the
+   * `host_uri`.
+   * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serverVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServerVersionBytes() { + java.lang.Object ref = serverVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverVersion_ = 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(hostUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretSecretVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, webhookSecretSecretVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getReadAuthorizerCredential()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getAuthorizerCredential()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getServiceDirectoryConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslCaCertificate_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sslCaCertificate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serverVersion_); + } + 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(hostUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hostUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookSecretSecretVersion_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, webhookSecretSecretVersion_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getReadAuthorizerCredential()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAuthorizerCredential()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getServiceDirectoryConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslCaCertificate_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sslCaCertificate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serverVersion_); + } + 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.developerconnect.v1.BitbucketDataCenterConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig other = + (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) obj; + + if (!getHostUri().equals(other.getHostUri())) return false; + if (!getWebhookSecretSecretVersion().equals(other.getWebhookSecretSecretVersion())) + return false; + if (hasReadAuthorizerCredential() != other.hasReadAuthorizerCredential()) return false; + if (hasReadAuthorizerCredential()) { + if (!getReadAuthorizerCredential().equals(other.getReadAuthorizerCredential())) return false; + } + if (hasAuthorizerCredential() != other.hasAuthorizerCredential()) return false; + if (hasAuthorizerCredential()) { + if (!getAuthorizerCredential().equals(other.getAuthorizerCredential())) return false; + } + if (hasServiceDirectoryConfig() != other.hasServiceDirectoryConfig()) return false; + if (hasServiceDirectoryConfig()) { + if (!getServiceDirectoryConfig().equals(other.getServiceDirectoryConfig())) return false; + } + if (!getSslCaCertificate().equals(other.getSslCaCertificate())) return false; + if (!getServerVersion().equals(other.getServerVersion())) 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) + HOST_URI_FIELD_NUMBER; + hash = (53 * hash) + getHostUri().hashCode(); + hash = (37 * hash) + WEBHOOK_SECRET_SECRET_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getWebhookSecretSecretVersion().hashCode(); + if (hasReadAuthorizerCredential()) { + hash = (37 * hash) + READ_AUTHORIZER_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getReadAuthorizerCredential().hashCode(); + } + if (hasAuthorizerCredential()) { + hash = (37 * hash) + AUTHORIZER_CREDENTIAL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizerCredential().hashCode(); + } + if (hasServiceDirectoryConfig()) { + hash = (37 * hash) + SERVICE_DIRECTORY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceDirectoryConfig().hashCode(); + } + hash = (37 * hash) + SSL_CA_CERTIFICATE_FIELD_NUMBER; + hash = (53 * hash) + getSslCaCertificate().hashCode(); + hash = (37 * hash) + SERVER_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getServerVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig 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.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + 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.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + java.io.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.developerconnect.v1.BitbucketDataCenterConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.BitbucketDataCenterConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.BitbucketDataCenterConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.BitbucketDataCenterConfig) + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.class, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadAuthorizerCredentialFieldBuilder(); + getAuthorizerCredentialFieldBuilder(); + getServiceDirectoryConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hostUri_ = ""; + webhookSecretSecretVersion_ = ""; + readAuthorizerCredential_ = null; + if (readAuthorizerCredentialBuilder_ != null) { + readAuthorizerCredentialBuilder_.dispose(); + readAuthorizerCredentialBuilder_ = null; + } + authorizerCredential_ = null; + if (authorizerCredentialBuilder_ != null) { + authorizerCredentialBuilder_.dispose(); + authorizerCredentialBuilder_ = null; + } + serviceDirectoryConfig_ = null; + if (serviceDirectoryConfigBuilder_ != null) { + serviceDirectoryConfigBuilder_.dispose(); + serviceDirectoryConfigBuilder_ = null; + } + sslCaCertificate_ = ""; + serverVersion_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig build() { + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig buildPartial() { + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig result = + new com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hostUri_ = hostUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.webhookSecretSecretVersion_ = webhookSecretSecretVersion_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.readAuthorizerCredential_ = + readAuthorizerCredentialBuilder_ == null + ? readAuthorizerCredential_ + : readAuthorizerCredentialBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.authorizerCredential_ = + authorizerCredentialBuilder_ == null + ? authorizerCredential_ + : authorizerCredentialBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceDirectoryConfig_ = + serviceDirectoryConfigBuilder_ == null + ? serviceDirectoryConfig_ + : serviceDirectoryConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sslCaCertificate_ = sslCaCertificate_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.serverVersion_ = serverVersion_; + } + 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.developerconnect.v1.BitbucketDataCenterConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig other) { + if (other + == com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance()) + return this; + if (!other.getHostUri().isEmpty()) { + hostUri_ = other.hostUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWebhookSecretSecretVersion().isEmpty()) { + webhookSecretSecretVersion_ = other.webhookSecretSecretVersion_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasReadAuthorizerCredential()) { + mergeReadAuthorizerCredential(other.getReadAuthorizerCredential()); + } + if (other.hasAuthorizerCredential()) { + mergeAuthorizerCredential(other.getAuthorizerCredential()); + } + if (other.hasServiceDirectoryConfig()) { + mergeServiceDirectoryConfig(other.getServiceDirectoryConfig()); + } + if (!other.getSslCaCertificate().isEmpty()) { + sslCaCertificate_ = other.sslCaCertificate_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getServerVersion().isEmpty()) { + serverVersion_ = other.serverVersion_; + bitField0_ |= 0x00000040; + 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: + { + hostUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + webhookSecretSecretVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getReadAuthorizerCredentialFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getAuthorizerCredentialFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getServiceDirectoryConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + sslCaCertificate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + serverVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + 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 hostUri_ = ""; + + /** + * + * + *
+     * Required. The URI of the Bitbucket Data Center host this connection is for.
+     * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hostUri. + */ + public java.lang.String getHostUri() { + java.lang.Object ref = hostUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hostUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the Bitbucket Data Center host this connection is for.
+     * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hostUri. + */ + public com.google.protobuf.ByteString getHostUriBytes() { + java.lang.Object ref = hostUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + hostUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The URI of the Bitbucket Data Center host this connection is for.
+     * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the Bitbucket Data Center host this connection is for.
+     * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearHostUri() { + hostUri_ = getDefaultInstance().getHostUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The URI of the Bitbucket Data Center host this connection is for.
+     * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for hostUri to set. + * @return This builder for chaining. + */ + public Builder setHostUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + hostUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object webhookSecretSecretVersion_ = ""; + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + public java.lang.String getWebhookSecretSecretVersion() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webhookSecretSecretVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + public com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes() { + java.lang.Object ref = webhookSecretSecretVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webhookSecretSecretVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The webhookSecretSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretSecretVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + webhookSecretSecretVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearWebhookSecretSecretVersion() { + webhookSecretSecretVersion_ = getDefaultInstance().getWebhookSecretSecretVersion(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. SecretManager resource containing the webhook secret
+     * used to verify webhook events, formatted as
+     * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+     * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for webhookSecretSecretVersion to set. + * @return This builder for chaining. + */ + public Builder setWebhookSecretSecretVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + webhookSecretSecretVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.developerconnect.v1.UserCredential readAuthorizerCredential_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + readAuthorizerCredentialBuilder_; + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + public boolean hasReadAuthorizerCredential() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + public com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential() { + if (readAuthorizerCredentialBuilder_ == null) { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } else { + return readAuthorizerCredentialBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (readAuthorizerCredentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readAuthorizerCredential_ = value; + } else { + readAuthorizerCredentialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential.Builder builderForValue) { + if (readAuthorizerCredentialBuilder_ == null) { + readAuthorizerCredential_ = builderForValue.build(); + } else { + readAuthorizerCredentialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReadAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (readAuthorizerCredentialBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && readAuthorizerCredential_ != null + && readAuthorizerCredential_ + != com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance()) { + getReadAuthorizerCredentialBuilder().mergeFrom(value); + } else { + readAuthorizerCredential_ = value; + } + } else { + readAuthorizerCredentialBuilder_.mergeFrom(value); + } + if (readAuthorizerCredential_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReadAuthorizerCredential() { + bitField0_ = (bitField0_ & ~0x00000004); + readAuthorizerCredential_ = null; + if (readAuthorizerCredentialBuilder_ != null) { + readAuthorizerCredentialBuilder_.dispose(); + readAuthorizerCredentialBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredential.Builder + getReadAuthorizerCredentialBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReadAuthorizerCredentialFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder() { + if (readAuthorizerCredentialBuilder_ != null) { + return readAuthorizerCredentialBuilder_.getMessageOrBuilder(); + } else { + return readAuthorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : readAuthorizerCredential_; + } + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository read` access.
+     * It's recommended to use a system account to generate the credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + getReadAuthorizerCredentialFieldBuilder() { + if (readAuthorizerCredentialBuilder_ == null) { + readAuthorizerCredentialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder>( + getReadAuthorizerCredential(), getParentForChildren(), isClean()); + readAuthorizerCredential_ = null; + } + return readAuthorizerCredentialBuilder_; + } + + private com.google.cloud.developerconnect.v1.UserCredential authorizerCredential_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + authorizerCredentialBuilder_; + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + public boolean hasAuthorizerCredential() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + public com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential() { + if (authorizerCredentialBuilder_ == null) { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } else { + return authorizerCredentialBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (authorizerCredentialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorizerCredential_ = value; + } else { + authorizerCredentialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential.Builder builderForValue) { + if (authorizerCredentialBuilder_ == null) { + authorizerCredential_ = builderForValue.build(); + } else { + authorizerCredentialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthorizerCredential( + com.google.cloud.developerconnect.v1.UserCredential value) { + if (authorizerCredentialBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && authorizerCredential_ != null + && authorizerCredential_ + != com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance()) { + getAuthorizerCredentialBuilder().mergeFrom(value); + } else { + authorizerCredential_ = value; + } + } else { + authorizerCredentialBuilder_.mergeFrom(value); + } + if (authorizerCredential_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthorizerCredential() { + bitField0_ = (bitField0_ & ~0x00000008); + authorizerCredential_ = null; + if (authorizerCredentialBuilder_ != null) { + authorizerCredentialBuilder_.dispose(); + authorizerCredentialBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredential.Builder + getAuthorizerCredentialBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getAuthorizerCredentialFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getAuthorizerCredentialOrBuilder() { + if (authorizerCredentialBuilder_ != null) { + return authorizerCredentialBuilder_.getMessageOrBuilder(); + } else { + return authorizerCredential_ == null + ? com.google.cloud.developerconnect.v1.UserCredential.getDefaultInstance() + : authorizerCredential_; + } + } + + /** + * + * + *
+     * Required. An http access token with the minimum `Repository admin` scope
+     * access. This is needed to create webhooks. It's recommended to use a system
+     * account to generate these credentials.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder> + getAuthorizerCredentialFieldBuilder() { + if (authorizerCredentialBuilder_ == null) { + authorizerCredentialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.UserCredential, + com.google.cloud.developerconnect.v1.UserCredential.Builder, + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder>( + getAuthorizerCredential(), getParentForChildren(), isClean()); + authorizerCredential_ = null; + } + return authorizerCredentialBuilder_; + } + + private com.google.cloud.developerconnect.v1.ServiceDirectoryConfig serviceDirectoryConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.Builder, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder> + serviceDirectoryConfigBuilder_; + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + public boolean hasServiceDirectoryConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + public com.google.cloud.developerconnect.v1.ServiceDirectoryConfig getServiceDirectoryConfig() { + if (serviceDirectoryConfigBuilder_ == null) { + return serviceDirectoryConfig_ == null + ? com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } else { + return serviceDirectoryConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceDirectoryConfig( + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig value) { + if (serviceDirectoryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceDirectoryConfig_ = value; + } else { + serviceDirectoryConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setServiceDirectoryConfig( + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.Builder builderForValue) { + if (serviceDirectoryConfigBuilder_ == null) { + serviceDirectoryConfig_ = builderForValue.build(); + } else { + serviceDirectoryConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeServiceDirectoryConfig( + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig value) { + if (serviceDirectoryConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && serviceDirectoryConfig_ != null + && serviceDirectoryConfig_ + != com.google.cloud.developerconnect.v1.ServiceDirectoryConfig + .getDefaultInstance()) { + getServiceDirectoryConfigBuilder().mergeFrom(value); + } else { + serviceDirectoryConfig_ = value; + } + } else { + serviceDirectoryConfigBuilder_.mergeFrom(value); + } + if (serviceDirectoryConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearServiceDirectoryConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + serviceDirectoryConfig_ = null; + if (serviceDirectoryConfigBuilder_ != null) { + serviceDirectoryConfigBuilder_.dispose(); + serviceDirectoryConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.Builder + getServiceDirectoryConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getServiceDirectoryConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder() { + if (serviceDirectoryConfigBuilder_ != null) { + return serviceDirectoryConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceDirectoryConfig_ == null + ? com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.getDefaultInstance() + : serviceDirectoryConfig_; + } + } + + /** + * + * + *
+     * Optional. Configuration for using Service Directory to privately connect to
+     * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+     * Data Center is hosted on-premises and not reachable by public internet. If
+     * this field is left empty, calls to the Bitbucket Data Center will be made
+     * over the public internet.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.Builder, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder> + getServiceDirectoryConfigFieldBuilder() { + if (serviceDirectoryConfigBuilder_ == null) { + serviceDirectoryConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig.Builder, + com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder>( + getServiceDirectoryConfig(), getParentForChildren(), isClean()); + serviceDirectoryConfig_ = null; + } + return serviceDirectoryConfigBuilder_; + } + + private java.lang.Object sslCaCertificate_ = ""; + + /** + * + * + *
+     * Optional. SSL certificate authority to trust when making requests to
+     * Bitbucket Data Center.
+     * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCaCertificate. + */ + public java.lang.String getSslCaCertificate() { + java.lang.Object ref = sslCaCertificate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sslCaCertificate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. SSL certificate authority to trust when making requests to
+     * Bitbucket Data Center.
+     * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCaCertificate. + */ + public com.google.protobuf.ByteString getSslCaCertificateBytes() { + java.lang.Object ref = sslCaCertificate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sslCaCertificate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. SSL certificate authority to trust when making requests to
+     * Bitbucket Data Center.
+     * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sslCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setSslCaCertificate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sslCaCertificate_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SSL certificate authority to trust when making requests to
+     * Bitbucket Data Center.
+     * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSslCaCertificate() { + sslCaCertificate_ = getDefaultInstance().getSslCaCertificate(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. SSL certificate authority to trust when making requests to
+     * Bitbucket Data Center.
+     * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sslCaCertificate to set. + * @return This builder for chaining. + */ + public Builder setSslCaCertificateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sslCaCertificate_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object serverVersion_ = ""; + + /** + * + * + *
+     * Output only. Version of the Bitbucket Data Center server running on the
+     * `host_uri`.
+     * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serverVersion. + */ + public java.lang.String getServerVersion() { + java.lang.Object ref = serverVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Version of the Bitbucket Data Center server running on the
+     * `host_uri`.
+     * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serverVersion. + */ + public com.google.protobuf.ByteString getServerVersionBytes() { + java.lang.Object ref = serverVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serverVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Version of the Bitbucket Data Center server running on the
+     * `host_uri`.
+     * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serverVersion to set. + * @return This builder for chaining. + */ + public Builder setServerVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serverVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Version of the Bitbucket Data Center server running on the
+     * `host_uri`.
+     * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServerVersion() { + serverVersion_ = getDefaultInstance().getServerVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Version of the Bitbucket Data Center server running on the
+     * `host_uri`.
+     * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serverVersion to set. + * @return This builder for chaining. + */ + public Builder setServerVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serverVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.BitbucketDataCenterConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.BitbucketDataCenterConfig) + private static final com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig(); + } + + public static com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BitbucketDataCenterConfig 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.developerconnect.v1.BitbucketDataCenterConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfigOrBuilder.java new file mode 100644 index 000000000000..83f6f97b52ad --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/BitbucketDataCenterConfigOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface BitbucketDataCenterConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.BitbucketDataCenterConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The URI of the Bitbucket Data Center host this connection is for.
+   * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The hostUri. + */ + java.lang.String getHostUri(); + + /** + * + * + *
+   * Required. The URI of the Bitbucket Data Center host this connection is for.
+   * 
+ * + * string host_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for hostUri. + */ + com.google.protobuf.ByteString getHostUriBytes(); + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The webhookSecretSecretVersion. + */ + java.lang.String getWebhookSecretSecretVersion(); + + /** + * + * + *
+   * Required. Immutable. SecretManager resource containing the webhook secret
+   * used to verify webhook events, formatted as
+   * `projects/*/secrets/*/versions/*`. This is used to validate webhooks.
+   * 
+ * + * + * string webhook_secret_secret_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for webhookSecretSecretVersion. + */ + com.google.protobuf.ByteString getWebhookSecretSecretVersionBytes(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the readAuthorizerCredential field is set. + */ + boolean hasReadAuthorizerCredential(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The readAuthorizerCredential. + */ + com.google.cloud.developerconnect.v1.UserCredential getReadAuthorizerCredential(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository read` access.
+   * It's recommended to use a system account to generate the credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential read_authorizer_credential = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder + getReadAuthorizerCredentialOrBuilder(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authorizerCredential field is set. + */ + boolean hasAuthorizerCredential(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authorizerCredential. + */ + com.google.cloud.developerconnect.v1.UserCredential getAuthorizerCredential(); + + /** + * + * + *
+   * Required. An http access token with the minimum `Repository admin` scope
+   * access. This is needed to create webhooks. It's recommended to use a system
+   * account to generate these credentials.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.UserCredential authorizer_credential = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.UserCredentialOrBuilder getAuthorizerCredentialOrBuilder(); + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the serviceDirectoryConfig field is set. + */ + boolean hasServiceDirectoryConfig(); + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The serviceDirectoryConfig. + */ + com.google.cloud.developerconnect.v1.ServiceDirectoryConfig getServiceDirectoryConfig(); + + /** + * + * + *
+   * Optional. Configuration for using Service Directory to privately connect to
+   * a Bitbucket Data Center instance. This should only be set if the Bitbucket
+   * Data Center is hosted on-premises and not reachable by public internet. If
+   * this field is left empty, calls to the Bitbucket Data Center will be made
+   * over the public internet.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.ServiceDirectoryConfig service_directory_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.ServiceDirectoryConfigOrBuilder + getServiceDirectoryConfigOrBuilder(); + + /** + * + * + *
+   * Optional. SSL certificate authority to trust when making requests to
+   * Bitbucket Data Center.
+   * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sslCaCertificate. + */ + java.lang.String getSslCaCertificate(); + + /** + * + * + *
+   * Optional. SSL certificate authority to trust when making requests to
+   * Bitbucket Data Center.
+   * 
+ * + * string ssl_ca_certificate = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sslCaCertificate. + */ + com.google.protobuf.ByteString getSslCaCertificateBytes(); + + /** + * + * + *
+   * Output only. Version of the Bitbucket Data Center server running on the
+   * `host_uri`.
+   * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serverVersion. + */ + java.lang.String getServerVersion(); + + /** + * + * + *
+   * Output only. Version of the Bitbucket Data Center server running on the
+   * `host_uri`.
+   * 
+ * + * string server_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serverVersion. + */ + com.google.protobuf.ByteString getServerVersionBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/Connection.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/Connection.java index c01acb66420a..90fba9025549 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/Connection.java +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/Connection.java @@ -94,6 +94,8 @@ public enum ConnectionConfigCase GITHUB_ENTERPRISE_CONFIG(13), GITLAB_CONFIG(14), GITLAB_ENTERPRISE_CONFIG(16), + BITBUCKET_DATA_CENTER_CONFIG(17), + BITBUCKET_CLOUD_CONFIG(18), CONNECTIONCONFIG_NOT_SET(0); private final int value; @@ -121,6 +123,10 @@ public static ConnectionConfigCase forNumber(int value) { return GITLAB_CONFIG; case 16: return GITLAB_ENTERPRISE_CONFIG; + case 17: + return BITBUCKET_DATA_CENTER_CONFIG; + case 18: + return BITBUCKET_CLOUD_CONFIG; case 0: return CONNECTIONCONFIG_NOT_SET; default: @@ -361,6 +367,126 @@ public com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig getGitlabEnte return com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig.getDefaultInstance(); } + public static final int BITBUCKET_DATA_CENTER_CONFIG_FIELD_NUMBER = 17; + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + * + * @return Whether the bitbucketDataCenterConfig field is set. + */ + @java.lang.Override + public boolean hasBitbucketDataCenterConfig() { + return connectionConfigCase_ == 17; + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + * + * @return The bitbucketDataCenterConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + getBitbucketDataCenterConfig() { + if (connectionConfigCase_ == 17) { + return (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder + getBitbucketDataCenterConfigOrBuilder() { + if (connectionConfigCase_ == 17) { + return (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); + } + + public static final int BITBUCKET_CLOUD_CONFIG_FIELD_NUMBER = 18; + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return Whether the bitbucketCloudConfig field is set. + */ + @java.lang.Override + public boolean hasBitbucketCloudConfig() { + return connectionConfigCase_ == 18; + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return The bitbucketCloudConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig getBitbucketCloudConfig() { + if (connectionConfigCase_ == 18) { + return (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder + getBitbucketCloudConfigOrBuilder() { + if (connectionConfigCase_ == 18) { + return (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -958,8 +1084,7 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the Connection.
    * 
* * @@ -985,8 +1110,7 @@ public java.lang.String getUid() { * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the Connection.
    * 
* * @@ -1071,6 +1195,71 @@ public com.google.cloud.developerconnect.v1.CryptoKeyConfig getCryptoKeyConfig() : cryptoKeyConfig_; } + public static final int GIT_PROXY_CONFIG_FIELD_NUMBER = 19; + private com.google.cloud.developerconnect.v1.GitProxyConfig gitProxyConfig_; + + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gitProxyConfig field is set. + */ + @java.lang.Override + public boolean hasGitProxyConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gitProxyConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GitProxyConfig getGitProxyConfig() { + return gitProxyConfig_ == null + ? com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance() + : gitProxyConfig_; + } + + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder getGitProxyConfigOrBuilder() { + return gitProxyConfig_ == null + ? com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance() + : gitProxyConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1134,6 +1323,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 16, (com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig) connectionConfig_); } + if (connectionConfigCase_ == 17) { + output.writeMessage( + 17, (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_); + } + if (connectionConfigCase_ == 18) { + output.writeMessage( + 18, (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(19, getGitProxyConfig()); + } getUnknownFields().writeTo(output); } @@ -1213,6 +1413,20 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 16, (com.google.cloud.developerconnect.v1.GitLabEnterpriseConfig) connectionConfig_); } + if (connectionConfigCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, + (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_); + } + if (connectionConfigCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getGitProxyConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1256,6 +1470,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCryptoKeyConfig()) { if (!getCryptoKeyConfig().equals(other.getCryptoKeyConfig())) return false; } + if (hasGitProxyConfig() != other.hasGitProxyConfig()) return false; + if (hasGitProxyConfig()) { + if (!getGitProxyConfig().equals(other.getGitProxyConfig())) return false; + } if (!getConnectionConfigCase().equals(other.getConnectionConfigCase())) return false; switch (connectionConfigCase_) { case 5: @@ -1270,6 +1488,13 @@ public boolean equals(final java.lang.Object obj) { case 16: if (!getGitlabEnterpriseConfig().equals(other.getGitlabEnterpriseConfig())) return false; break; + case 17: + if (!getBitbucketDataCenterConfig().equals(other.getBitbucketDataCenterConfig())) + return false; + break; + case 18: + if (!getBitbucketCloudConfig().equals(other.getBitbucketCloudConfig())) return false; + break; case 0: default: } @@ -1322,6 +1547,10 @@ public int hashCode() { hash = (37 * hash) + CRYPTO_KEY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getCryptoKeyConfig().hashCode(); } + if (hasGitProxyConfig()) { + hash = (37 * hash) + GIT_PROXY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGitProxyConfig().hashCode(); + } switch (connectionConfigCase_) { case 5: hash = (37 * hash) + GITHUB_CONFIG_FIELD_NUMBER; @@ -1339,6 +1568,14 @@ public int hashCode() { hash = (37 * hash) + GITLAB_ENTERPRISE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getGitlabEnterpriseConfig().hashCode(); break; + case 17: + hash = (37 * hash) + BITBUCKET_DATA_CENTER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBitbucketDataCenterConfig().hashCode(); + break; + case 18: + hash = (37 * hash) + BITBUCKET_CLOUD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBitbucketCloudConfig().hashCode(); + break; case 0: default: } @@ -1514,6 +1751,7 @@ private void maybeForceBuilderInitialization() { getDeleteTimeFieldBuilder(); getInstallationStateFieldBuilder(); getCryptoKeyConfigFieldBuilder(); + getGitProxyConfigFieldBuilder(); } } @@ -1533,6 +1771,12 @@ public Builder clear() { if (gitlabEnterpriseConfigBuilder_ != null) { gitlabEnterpriseConfigBuilder_.clear(); } + if (bitbucketDataCenterConfigBuilder_ != null) { + bitbucketDataCenterConfigBuilder_.clear(); + } + if (bitbucketCloudConfigBuilder_ != null) { + bitbucketCloudConfigBuilder_.clear(); + } name_ = ""; createTime_ = null; if (createTimeBuilder_ != null) { @@ -1565,6 +1809,11 @@ public Builder clear() { cryptoKeyConfigBuilder_.dispose(); cryptoKeyConfigBuilder_ = null; } + gitProxyConfig_ = null; + if (gitProxyConfigBuilder_ != null) { + gitProxyConfigBuilder_.dispose(); + gitProxyConfigBuilder_ = null; + } connectionConfigCase_ = 0; connectionConfig_ = null; return this; @@ -1604,54 +1853,59 @@ public com.google.cloud.developerconnect.v1.Connection buildPartial() { private void buildPartial0(com.google.cloud.developerconnect.v1.Connection result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.name_ = name_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.installationState_ = installationStateBuilder_ == null ? installationState_ : installationStateBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.disabled_ = disabled_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.reconciling_ = reconciling_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.annotations_ = internalGetAnnotations(); result.annotations_.makeImmutable(); } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.etag_ = etag_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.uid_ = uid_; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.cryptoKeyConfig_ = cryptoKeyConfigBuilder_ == null ? cryptoKeyConfig_ : cryptoKeyConfigBuilder_.build(); to_bitField0_ |= 0x00000010; } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.gitProxyConfig_ = + gitProxyConfigBuilder_ == null ? gitProxyConfig_ : gitProxyConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } result.bitField0_ |= to_bitField0_; } @@ -1670,6 +1924,12 @@ private void buildPartialOneofs(com.google.cloud.developerconnect.v1.Connection if (connectionConfigCase_ == 16 && gitlabEnterpriseConfigBuilder_ != null) { result.connectionConfig_ = gitlabEnterpriseConfigBuilder_.build(); } + if (connectionConfigCase_ == 17 && bitbucketDataCenterConfigBuilder_ != null) { + result.connectionConfig_ = bitbucketDataCenterConfigBuilder_.build(); + } + if (connectionConfigCase_ == 18 && bitbucketCloudConfigBuilder_ != null) { + result.connectionConfig_ = bitbucketCloudConfigBuilder_.build(); + } } @java.lang.Override @@ -1720,7 +1980,7 @@ public Builder mergeFrom(com.google.cloud.developerconnect.v1.Connection other) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); } if (other.hasCreateTime()) { @@ -1733,7 +1993,7 @@ public Builder mergeFrom(com.google.cloud.developerconnect.v1.Connection other) mergeDeleteTime(other.getDeleteTime()); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; if (other.hasInstallationState()) { mergeInstallationState(other.getInstallationState()); } @@ -1744,20 +2004,23 @@ public Builder mergeFrom(com.google.cloud.developerconnect.v1.Connection other) setReconciling(other.getReconciling()); } internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; if (!other.getEtag().isEmpty()) { etag_ = other.etag_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); } if (!other.getUid().isEmpty()) { uid_ = other.uid_; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00010000; onChanged(); } if (other.hasCryptoKeyConfig()) { mergeCryptoKeyConfig(other.getCryptoKeyConfig()); } + if (other.hasGitProxyConfig()) { + mergeGitProxyConfig(other.getGitProxyConfig()); + } switch (other.getConnectionConfigCase()) { case GITHUB_CONFIG: { @@ -1779,6 +2042,16 @@ public Builder mergeFrom(com.google.cloud.developerconnect.v1.Connection other) mergeGitlabEnterpriseConfig(other.getGitlabEnterpriseConfig()); break; } + case BITBUCKET_DATA_CENTER_CONFIG: + { + mergeBitbucketDataCenterConfig(other.getBitbucketDataCenterConfig()); + break; + } + case BITBUCKET_CLOUD_CONFIG: + { + mergeBitbucketCloudConfig(other.getBitbucketCloudConfig()); + break; + } case CONNECTIONCONFIG_NOT_SET: { break; @@ -1813,19 +2086,19 @@ public Builder mergeFrom( case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } // case 10 case 18: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; break; } // case 18 case 26: { input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; break; } // case 26 case 34: @@ -1837,7 +2110,7 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; break; } // case 34 case 42: @@ -1850,19 +2123,19 @@ public Builder mergeFrom( { input.readMessage( getInstallationStateFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; break; } // case 50 case 56: { disabled_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; break; } // case 56 case 64: { reconciling_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; break; } // case 64 case 74: @@ -1874,25 +2147,25 @@ public Builder mergeFrom( internalGetMutableAnnotations() .getMutableMap() .put(annotations__.getKey(), annotations__.getValue()); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; break; } // case 74 case 82: { etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; break; } // case 82 case 90: { input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; break; } // case 90 case 98: { uid_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00010000; break; } // case 98 case 106: @@ -1911,7 +2184,7 @@ public Builder mergeFrom( case 122: { input.readMessage(getCryptoKeyConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00020000; break; } // case 122 case 130: @@ -1921,6 +2194,26 @@ public Builder mergeFrom( connectionConfigCase_ = 16; break; } // case 130 + case 138: + { + input.readMessage( + getBitbucketDataCenterConfigFieldBuilder().getBuilder(), extensionRegistry); + connectionConfigCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage( + getBitbucketCloudConfigFieldBuilder().getBuilder(), extensionRegistry); + connectionConfigCase_ = 18; + break; + } // case 146 + case 154: + { + input.readMessage(getGitProxyConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2864,53 +3157,56 @@ public Builder clearGitlabEnterpriseConfig() { return gitlabEnterpriseConfigBuilder_; } - private java.lang.Object name_ = ""; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder> + bitbucketDataCenterConfigBuilder_; /** * * *
-     * Identifier. The resource name of the connection, in the format
-     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * Configuration for connections to an instance of Bitbucket Data Center.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * * - * @return The name. + * @return Whether the bitbucketDataCenterConfig field is set. */ - 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; - } + @java.lang.Override + public boolean hasBitbucketDataCenterConfig() { + return connectionConfigCase_ == 17; } /** * * *
-     * Identifier. The resource name of the connection, in the format
-     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * Configuration for connections to an instance of Bitbucket Data Center.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * * - * @return The bytes for name. + * @return The bitbucketDataCenterConfig. */ - 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; + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + getBitbucketDataCenterConfig() { + if (bitbucketDataCenterConfigBuilder_ == null) { + if (connectionConfigCase_ == 17) { + return (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); } else { - return (com.google.protobuf.ByteString) ref; + if (connectionConfigCase_ == 17) { + return bitbucketDataCenterConfigBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); } } @@ -2918,21 +3214,496 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Identifier. The resource name of the connection, in the format
-     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * Configuration for connections to an instance of Bitbucket Data Center.
      * 
* - * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * - * @param value The name to set. - * @return This builder for chaining. + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setBitbucketDataCenterConfig( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig value) { + if (bitbucketDataCenterConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionConfig_ = value; + onChanged(); + } else { + bitbucketDataCenterConfigBuilder_.setMessage(value); + } + connectionConfigCase_ = 17; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + public Builder setBitbucketDataCenterConfig( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder builderForValue) { + if (bitbucketDataCenterConfigBuilder_ == null) { + connectionConfig_ = builderForValue.build(); + onChanged(); + } else { + bitbucketDataCenterConfigBuilder_.setMessage(builderForValue.build()); + } + connectionConfigCase_ = 17; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + public Builder mergeBitbucketDataCenterConfig( + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig value) { + if (bitbucketDataCenterConfigBuilder_ == null) { + if (connectionConfigCase_ == 17 + && connectionConfig_ + != com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig + .getDefaultInstance()) { + connectionConfig_ = + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.newBuilder( + (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) + connectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionConfig_ = value; + } + onChanged(); + } else { + if (connectionConfigCase_ == 17) { + bitbucketDataCenterConfigBuilder_.mergeFrom(value); + } else { + bitbucketDataCenterConfigBuilder_.setMessage(value); + } + } + connectionConfigCase_ = 17; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + public Builder clearBitbucketDataCenterConfig() { + if (bitbucketDataCenterConfigBuilder_ == null) { + if (connectionConfigCase_ == 17) { + connectionConfigCase_ = 0; + connectionConfig_ = null; + onChanged(); + } + } else { + if (connectionConfigCase_ == 17) { + connectionConfigCase_ = 0; + connectionConfig_ = null; + } + bitbucketDataCenterConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder + getBitbucketDataCenterConfigBuilder() { + return getBitbucketDataCenterConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder + getBitbucketDataCenterConfigOrBuilder() { + if ((connectionConfigCase_ == 17) && (bitbucketDataCenterConfigBuilder_ != null)) { + return bitbucketDataCenterConfigBuilder_.getMessageOrBuilder(); + } else { + if (connectionConfigCase_ == 17) { + return (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Data Center.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder> + getBitbucketDataCenterConfigFieldBuilder() { + if (bitbucketDataCenterConfigBuilder_ == null) { + if (!(connectionConfigCase_ == 17)) { + connectionConfig_ = + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.getDefaultInstance(); + } + bitbucketDataCenterConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder>( + (com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig) connectionConfig_, + getParentForChildren(), + isClean()); + connectionConfig_ = null; + } + connectionConfigCase_ = 17; + onChanged(); + return bitbucketDataCenterConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketCloudConfig, + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder> + bitbucketCloudConfigBuilder_; + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return Whether the bitbucketCloudConfig field is set. + */ + @java.lang.Override + public boolean hasBitbucketCloudConfig() { + return connectionConfigCase_ == 18; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return The bitbucketCloudConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig getBitbucketCloudConfig() { + if (bitbucketCloudConfigBuilder_ == null) { + if (connectionConfigCase_ == 18) { + return (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } else { + if (connectionConfigCase_ == 18) { + return bitbucketCloudConfigBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + public Builder setBitbucketCloudConfig( + com.google.cloud.developerconnect.v1.BitbucketCloudConfig value) { + if (bitbucketCloudConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionConfig_ = value; + onChanged(); + } else { + bitbucketCloudConfigBuilder_.setMessage(value); + } + connectionConfigCase_ = 18; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + public Builder setBitbucketCloudConfig( + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder builderForValue) { + if (bitbucketCloudConfigBuilder_ == null) { + connectionConfig_ = builderForValue.build(); + onChanged(); + } else { + bitbucketCloudConfigBuilder_.setMessage(builderForValue.build()); + } + connectionConfigCase_ = 18; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + public Builder mergeBitbucketCloudConfig( + com.google.cloud.developerconnect.v1.BitbucketCloudConfig value) { + if (bitbucketCloudConfigBuilder_ == null) { + if (connectionConfigCase_ == 18 + && connectionConfig_ + != com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance()) { + connectionConfig_ = + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.newBuilder( + (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + connectionConfig_ = value; + } + onChanged(); + } else { + if (connectionConfigCase_ == 18) { + bitbucketCloudConfigBuilder_.mergeFrom(value); + } else { + bitbucketCloudConfigBuilder_.setMessage(value); + } + } + connectionConfigCase_ = 18; + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + public Builder clearBitbucketCloudConfig() { + if (bitbucketCloudConfigBuilder_ == null) { + if (connectionConfigCase_ == 18) { + connectionConfigCase_ = 0; + connectionConfig_ = null; + onChanged(); + } + } else { + if (connectionConfigCase_ == 18) { + connectionConfigCase_ = 0; + connectionConfig_ = null; + } + bitbucketCloudConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + public com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder + getBitbucketCloudConfigBuilder() { + return getBitbucketCloudConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder + getBitbucketCloudConfigOrBuilder() { + if ((connectionConfigCase_ == 18) && (bitbucketCloudConfigBuilder_ != null)) { + return bitbucketCloudConfigBuilder_.getMessageOrBuilder(); + } else { + if (connectionConfigCase_ == 18) { + return (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_; + } + return com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Configuration for connections to an instance of Bitbucket Clouds.
+     * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketCloudConfig, + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder> + getBitbucketCloudConfigFieldBuilder() { + if (bitbucketCloudConfigBuilder_ == null) { + if (!(connectionConfigCase_ == 18)) { + connectionConfig_ = + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.getDefaultInstance(); + } + bitbucketCloudConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.BitbucketCloudConfig, + com.google.cloud.developerconnect.v1.BitbucketCloudConfig.Builder, + com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder>( + (com.google.cloud.developerconnect.v1.BitbucketCloudConfig) connectionConfig_, + getParentForChildren(), + isClean()); + connectionConfig_ = null; + } + connectionConfigCase_ = 18; + onChanged(); + return bitbucketCloudConfigBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The resource name of the connection, in the format
+     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * 
+ * + * 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 resource name of the connection, in the format
+     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * 
+ * + * 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 resource name of the connection, in the format
+     * `projects/{project}/locations/{location}/connections/{connection_id}`.
+     * 
+ * + * 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_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2951,7 +3722,7 @@ public Builder setName(java.lang.String value) { */ public Builder clearName() { name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -2975,7 +3746,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); name_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3001,7 +3772,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * @return Whether the createTime field is set. */ public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -3047,7 +3818,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3069,7 +3840,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { createTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3087,7 +3858,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000080) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); @@ -3098,7 +3869,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -3116,7 +3887,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { *
*/ public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); @@ -3138,7 +3909,7 @@ public Builder clearCreateTime() { *
*/ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } @@ -3213,7 +3984,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** @@ -3259,7 +4030,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3281,7 +4052,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal } else { updateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3299,7 +4070,7 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000100) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); @@ -3310,7 +4081,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { updateTimeBuilder_.mergeFrom(value); } if (updateTime_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); } return this; @@ -3328,7 +4099,7 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * */ public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000100); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); @@ -3350,7 +4121,7 @@ public Builder clearUpdateTime() { * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } @@ -3425,7 +4196,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * @return Whether the deleteTime field is set. */ public boolean hasDeleteTime() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** @@ -3471,7 +4242,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { } else { deleteTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3493,7 +4264,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal } else { deleteTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3511,7 +4282,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal */ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { if (deleteTimeBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000200) != 0) && deleteTime_ != null && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getDeleteTimeBuilder().mergeFrom(value); @@ -3522,7 +4293,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { deleteTimeBuilder_.mergeFrom(value); } if (deleteTime_ != null) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -3540,7 +4311,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * */ public Builder clearDeleteTime() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000200); deleteTime_ = null; if (deleteTimeBuilder_ != null) { deleteTimeBuilder_.dispose(); @@ -3562,7 +4333,7 @@ public Builder clearDeleteTime() { * */ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; onChanged(); return getDeleteTimeFieldBuilder().getBuilder(); } @@ -3633,7 +4404,7 @@ private com.google.protobuf.MapField interna if (!labels_.isMutable()) { labels_ = labels_.copy(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; onChanged(); return labels_; } @@ -3723,7 +4494,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000400); internalGetMutableLabels().getMutableMap().clear(); return this; } @@ -3748,7 +4519,7 @@ public Builder removeLabels(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; return internalGetMutableLabels().getMutableMap(); } @@ -3769,7 +4540,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; return this; } @@ -3784,7 +4555,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; return this; } @@ -3809,7 +4580,7 @@ public Builder putAllLabels(java.util.Map va * @return Whether the installationState field is set. */ public boolean hasInstallationState() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000800) != 0); } /** @@ -3856,7 +4627,7 @@ public Builder setInstallationState( } else { installationStateBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3879,7 +4650,7 @@ public Builder setInstallationState( } else { installationStateBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3898,7 +4669,7 @@ public Builder setInstallationState( public Builder mergeInstallationState( com.google.cloud.developerconnect.v1.InstallationState value) { if (installationStateBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000800) != 0) && installationState_ != null && installationState_ != com.google.cloud.developerconnect.v1.InstallationState.getDefaultInstance()) { @@ -3910,7 +4681,7 @@ public Builder mergeInstallationState( installationStateBuilder_.mergeFrom(value); } if (installationState_ != null) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); } return this; @@ -3928,7 +4699,7 @@ public Builder mergeInstallationState( * */ public Builder clearInstallationState() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000800); installationState_ = null; if (installationStateBuilder_ != null) { installationStateBuilder_.dispose(); @@ -3951,7 +4722,7 @@ public Builder clearInstallationState() { */ public com.google.cloud.developerconnect.v1.InstallationState.Builder getInstallationStateBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; onChanged(); return getInstallationStateFieldBuilder().getBuilder(); } @@ -4043,7 +4814,7 @@ public boolean getDisabled() { public Builder setDisabled(boolean value) { disabled_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4062,7 +4833,7 @@ public Builder setDisabled(boolean value) { * @return This builder for chaining. */ public Builder clearDisabled() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00001000); disabled_ = false; onChanged(); return this; @@ -4103,7 +4874,7 @@ public boolean getReconciling() { public Builder setReconciling(boolean value) { reconciling_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4121,7 +4892,7 @@ public Builder setReconciling(boolean value) { * @return This builder for chaining. */ public Builder clearReconciling() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00002000); reconciling_ = false; onChanged(); return this; @@ -4147,7 +4918,7 @@ public Builder clearReconciling() { if (!annotations_.isMutable()) { annotations_ = annotations_.copy(); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; onChanged(); return annotations_; } @@ -4241,7 +5012,7 @@ public java.lang.String getAnnotationsOrThrow(java.lang.String key) { } public Builder clearAnnotations() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00004000); internalGetMutableAnnotations().getMutableMap().clear(); return this; } @@ -4267,7 +5038,7 @@ public Builder removeAnnotations(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAnnotations() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; return internalGetMutableAnnotations().getMutableMap(); } @@ -4289,7 +5060,7 @@ public Builder putAnnotations(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableAnnotations().getMutableMap().put(key, value); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; return this; } @@ -4305,7 +5076,7 @@ public Builder putAnnotations(java.lang.String key, java.lang.String value) { */ public Builder putAllAnnotations(java.util.Map values) { internalGetMutableAnnotations().getMutableMap().putAll(values); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00004000; return this; } @@ -4380,7 +5151,7 @@ public Builder setEtag(java.lang.String value) { throw new NullPointerException(); } etag_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4400,7 +5171,7 @@ public Builder setEtag(java.lang.String value) { */ public Builder clearEtag() { etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); return this; } @@ -4425,7 +5196,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); etag_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4436,8 +5207,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the Connection.
      * 
* * @@ -4462,8 +5232,7 @@ public java.lang.String getUid() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the Connection.
      * 
* * @@ -4488,8 +5257,7 @@ public com.google.protobuf.ByteString getUidBytes() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the Connection.
      * 
* * @@ -4504,7 +5272,7 @@ public Builder setUid(java.lang.String value) { throw new NullPointerException(); } uid_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4513,8 +5281,7 @@ public Builder setUid(java.lang.String value) { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the Connection.
      * 
* * @@ -4525,7 +5292,7 @@ public Builder setUid(java.lang.String value) { */ public Builder clearUid() { uid_ = getDefaultInstance().getUid(); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00010000); onChanged(); return this; } @@ -4534,8 +5301,7 @@ public Builder clearUid() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the Connection.
      * 
* * @@ -4551,7 +5317,7 @@ public Builder setUidBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); uid_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -4578,7 +5344,7 @@ public Builder setUidBytes(com.google.protobuf.ByteString value) { * @return Whether the cryptoKeyConfig field is set. */ public boolean hasCryptoKeyConfig() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** @@ -4626,7 +5392,7 @@ public Builder setCryptoKeyConfig(com.google.cloud.developerconnect.v1.CryptoKey } else { cryptoKeyConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4650,7 +5416,7 @@ public Builder setCryptoKeyConfig( } else { cryptoKeyConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -4670,7 +5436,7 @@ public Builder setCryptoKeyConfig( public Builder mergeCryptoKeyConfig( com.google.cloud.developerconnect.v1.CryptoKeyConfig value) { if (cryptoKeyConfigBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00020000) != 0) && cryptoKeyConfig_ != null && cryptoKeyConfig_ != com.google.cloud.developerconnect.v1.CryptoKeyConfig.getDefaultInstance()) { @@ -4682,7 +5448,7 @@ public Builder mergeCryptoKeyConfig( cryptoKeyConfigBuilder_.mergeFrom(value); } if (cryptoKeyConfig_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -4701,7 +5467,7 @@ public Builder mergeCryptoKeyConfig( * */ public Builder clearCryptoKeyConfig() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00020000); cryptoKeyConfig_ = null; if (cryptoKeyConfigBuilder_ != null) { cryptoKeyConfigBuilder_.dispose(); @@ -4725,7 +5491,7 @@ public Builder clearCryptoKeyConfig() { */ public com.google.cloud.developerconnect.v1.CryptoKeyConfig.Builder getCryptoKeyConfigBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00020000; onChanged(); return getCryptoKeyConfigFieldBuilder().getBuilder(); } @@ -4782,6 +5548,239 @@ public Builder clearCryptoKeyConfig() { return cryptoKeyConfigBuilder_; } + private com.google.cloud.developerconnect.v1.GitProxyConfig gitProxyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GitProxyConfig, + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder, + com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder> + gitProxyConfigBuilder_; + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gitProxyConfig field is set. + */ + public boolean hasGitProxyConfig() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gitProxyConfig. + */ + public com.google.cloud.developerconnect.v1.GitProxyConfig getGitProxyConfig() { + if (gitProxyConfigBuilder_ == null) { + return gitProxyConfig_ == null + ? com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance() + : gitProxyConfig_; + } else { + return gitProxyConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGitProxyConfig(com.google.cloud.developerconnect.v1.GitProxyConfig value) { + if (gitProxyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gitProxyConfig_ = value; + } else { + gitProxyConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGitProxyConfig( + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder builderForValue) { + if (gitProxyConfigBuilder_ == null) { + gitProxyConfig_ = builderForValue.build(); + } else { + gitProxyConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGitProxyConfig(com.google.cloud.developerconnect.v1.GitProxyConfig value) { + if (gitProxyConfigBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && gitProxyConfig_ != null + && gitProxyConfig_ + != com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance()) { + getGitProxyConfigBuilder().mergeFrom(value); + } else { + gitProxyConfig_ = value; + } + } else { + gitProxyConfigBuilder_.mergeFrom(value); + } + if (gitProxyConfig_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGitProxyConfig() { + bitField0_ = (bitField0_ & ~0x00040000); + gitProxyConfig_ = null; + if (gitProxyConfigBuilder_ != null) { + gitProxyConfigBuilder_.dispose(); + gitProxyConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.GitProxyConfig.Builder getGitProxyConfigBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getGitProxyConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder + getGitProxyConfigOrBuilder() { + if (gitProxyConfigBuilder_ != null) { + return gitProxyConfigBuilder_.getMessageOrBuilder(); + } else { + return gitProxyConfig_ == null + ? com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance() + : gitProxyConfig_; + } + } + + /** + * + * + *
+     * Optional. Configuration for the git proxy feature. Enabling the git proxy
+     * allows clients to perform git operations on the repositories linked in the
+     * connection.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GitProxyConfig, + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder, + com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder> + getGitProxyConfigFieldBuilder() { + if (gitProxyConfigBuilder_ == null) { + gitProxyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GitProxyConfig, + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder, + com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder>( + getGitProxyConfig(), getParentForChildren(), isClean()); + gitProxyConfig_ = null; + } + return gitProxyConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ConnectionOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ConnectionOrBuilder.java index 37b9b7d58848..546ceaf6c0de 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ConnectionOrBuilder.java +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ConnectionOrBuilder.java @@ -180,6 +180,91 @@ public interface ConnectionOrBuilder com.google.cloud.developerconnect.v1.GitLabEnterpriseConfigOrBuilder getGitlabEnterpriseConfigOrBuilder(); + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + * + * @return Whether the bitbucketDataCenterConfig field is set. + */ + boolean hasBitbucketDataCenterConfig(); + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + * + * @return The bitbucketDataCenterConfig. + */ + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfig getBitbucketDataCenterConfig(); + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Data Center.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.BitbucketDataCenterConfig bitbucket_data_center_config = 17; + * + */ + com.google.cloud.developerconnect.v1.BitbucketDataCenterConfigOrBuilder + getBitbucketDataCenterConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return Whether the bitbucketCloudConfig field is set. + */ + boolean hasBitbucketCloudConfig(); + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + * + * @return The bitbucketCloudConfig. + */ + com.google.cloud.developerconnect.v1.BitbucketCloudConfig getBitbucketCloudConfig(); + + /** + * + * + *
+   * Configuration for connections to an instance of Bitbucket Clouds.
+   * 
+ * + * .google.cloud.developerconnect.v1.BitbucketCloudConfig bitbucket_cloud_config = 18; + * + */ + com.google.cloud.developerconnect.v1.BitbucketCloudConfigOrBuilder + getBitbucketCloudConfigOrBuilder(); + /** * * @@ -565,8 +650,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the Connection.
    * 
* * @@ -581,8 +665,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the Connection.
    * 
* * @@ -639,5 +722,54 @@ java.lang.String getAnnotationsOrDefault( */ com.google.cloud.developerconnect.v1.CryptoKeyConfigOrBuilder getCryptoKeyConfigOrBuilder(); + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the gitProxyConfig field is set. + */ + boolean hasGitProxyConfig(); + + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The gitProxyConfig. + */ + com.google.cloud.developerconnect.v1.GitProxyConfig getGitProxyConfig(); + + /** + * + * + *
+   * Optional. Configuration for the git proxy feature. Enabling the git proxy
+   * allows clients to perform git operations on the repositories linked in the
+   * connection.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GitProxyConfig git_proxy_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder getGitProxyConfigOrBuilder(); + com.google.cloud.developerconnect.v1.Connection.ConnectionConfigCase getConnectionConfigCase(); } diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequest.java new file mode 100644 index 000000000000..41b4f5c074ae --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequest.java @@ -0,0 +1,1562 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** Protobuf type {@code google.cloud.developerconnect.v1.CreateAccountConnectorRequest} */ +public final class CreateAccountConnectorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.CreateAccountConnectorRequest) + CreateAccountConnectorRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateAccountConnectorRequest.newBuilder() to construct. + private CreateAccountConnectorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAccountConnectorRequest() { + parent_ = ""; + accountConnectorId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAccountConnectorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Location resource name as the account_connector’s parent.
+   * 
+ * + * + * 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. Location resource name as the account_connector’s parent.
+   * 
+ * + * + * 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 ACCOUNT_CONNECTOR_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object accountConnectorId_ = ""; + + /** + * + * + *
+   * Required. The ID to use for the AccountConnector, which will become the
+   * final component of the AccountConnector's resource name. Its format should
+   * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+   * unique per-project per-location.
+   * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountConnectorId. + */ + @java.lang.Override + public java.lang.String getAccountConnectorId() { + java.lang.Object ref = accountConnectorId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountConnectorId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID to use for the AccountConnector, which will become the
+   * final component of the AccountConnector's resource name. Its format should
+   * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+   * unique per-project per-location.
+   * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountConnectorId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountConnectorIdBytes() { + java.lang.Object ref = accountConnectorId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountConnectorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_CONNECTOR_FIELD_NUMBER = 3; + private com.google.cloud.developerconnect.v1.AccountConnector accountConnector_; + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + @java.lang.Override + public boolean hasAccountConnector() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector() { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorOrBuilder() { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(accountConnectorId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accountConnectorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAccountConnector()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + 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(accountConnectorId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accountConnectorId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAccountConnector()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + 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.developerconnect.v1.CreateAccountConnectorRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest other = + (com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAccountConnectorId().equals(other.getAccountConnectorId())) return false; + if (hasAccountConnector() != other.hasAccountConnector()) return false; + if (hasAccountConnector()) { + if (!getAccountConnector().equals(other.getAccountConnector())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) 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) + ACCOUNT_CONNECTOR_ID_FIELD_NUMBER; + hash = (53 * hash) + getAccountConnectorId().hashCode(); + if (hasAccountConnector()) { + hash = (37 * hash) + ACCOUNT_CONNECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAccountConnector().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest 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.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + 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.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + java.io.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.developerconnect.v1.CreateAccountConnectorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + parseDelimitedFrom( + java.io.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.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.CreateAccountConnectorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** Protobuf type {@code google.cloud.developerconnect.v1.CreateAccountConnectorRequest} */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.CreateAccountConnectorRequest) + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.Builder.class); + } + + // Construct using + // com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAccountConnectorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + accountConnectorId_ = ""; + accountConnector_ = null; + if (accountConnectorBuilder_ != null) { + accountConnectorBuilder_.dispose(); + accountConnectorBuilder_ = null; + } + requestId_ = ""; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest build() { + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest buildPartial() { + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest result = + new com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.accountConnectorId_ = accountConnectorId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.accountConnector_ = + accountConnectorBuilder_ == null ? accountConnector_ : accountConnectorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + 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.developerconnect.v1.CreateAccountConnectorRequest) { + return mergeFrom( + (com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest other) { + if (other + == com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAccountConnectorId().isEmpty()) { + accountConnectorId_ = other.accountConnectorId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAccountConnector()) { + mergeAccountConnector(other.getAccountConnector()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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: + { + accountConnectorId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getAccountConnectorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Location resource name as the account_connector’s parent.
+     * 
+ * + * + * 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. Location resource name as the account_connector’s parent.
+     * 
+ * + * + * 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. Location resource name as the account_connector’s parent.
+     * 
+ * + * + * 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. Location resource name as the account_connector’s parent.
+     * 
+ * + * + * 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. Location resource name as the account_connector’s parent.
+     * 
+ * + * + * 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 accountConnectorId_ = ""; + + /** + * + * + *
+     * Required. The ID to use for the AccountConnector, which will become the
+     * final component of the AccountConnector's resource name. Its format should
+     * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+     * unique per-project per-location.
+     * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountConnectorId. + */ + public java.lang.String getAccountConnectorId() { + java.lang.Object ref = accountConnectorId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountConnectorId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the AccountConnector, which will become the
+     * final component of the AccountConnector's resource name. Its format should
+     * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+     * unique per-project per-location.
+     * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountConnectorId. + */ + public com.google.protobuf.ByteString getAccountConnectorIdBytes() { + java.lang.Object ref = accountConnectorId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountConnectorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID to use for the AccountConnector, which will become the
+     * final component of the AccountConnector's resource name. Its format should
+     * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+     * unique per-project per-location.
+     * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The accountConnectorId to set. + * @return This builder for chaining. + */ + public Builder setAccountConnectorId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accountConnectorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the AccountConnector, which will become the
+     * final component of the AccountConnector's resource name. Its format should
+     * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+     * unique per-project per-location.
+     * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccountConnectorId() { + accountConnectorId_ = getDefaultInstance().getAccountConnectorId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID to use for the AccountConnector, which will become the
+     * final component of the AccountConnector's resource name. Its format should
+     * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+     * unique per-project per-location.
+     * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for accountConnectorId to set. + * @return This builder for chaining. + */ + public Builder setAccountConnectorIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accountConnectorId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.developerconnect.v1.AccountConnector accountConnector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + accountConnectorBuilder_; + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + public boolean hasAccountConnector() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector() { + if (accountConnectorBuilder_ == null) { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } else { + return accountConnectorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accountConnector_ = value; + } else { + accountConnectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector.Builder builderForValue) { + if (accountConnectorBuilder_ == null) { + accountConnector_ = builderForValue.build(); + } else { + accountConnectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && accountConnector_ != null + && accountConnector_ + != com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance()) { + getAccountConnectorBuilder().mergeFrom(value); + } else { + accountConnector_ = value; + } + } else { + accountConnectorBuilder_.mergeFrom(value); + } + if (accountConnector_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAccountConnector() { + bitField0_ = (bitField0_ & ~0x00000004); + accountConnector_ = null; + if (accountConnectorBuilder_ != null) { + accountConnectorBuilder_.dispose(); + accountConnectorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector.Builder + getAccountConnectorBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAccountConnectorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorOrBuilder() { + if (accountConnectorBuilder_ != null) { + return accountConnectorBuilder_.getMessageOrBuilder(); + } else { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + } + + /** + * + * + *
+     * Required. The AccountConnector to create.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + getAccountConnectorFieldBuilder() { + if (accountConnectorBuilder_ == null) { + accountConnectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder>( + getAccountConnector(), getParentForChildren(), isClean()); + accountConnector_ = null; + } + return accountConnectorBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.CreateAccountConnectorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.CreateAccountConnectorRequest) + private static final com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest(); + } + + public static com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAccountConnectorRequest 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.developerconnect.v1.CreateAccountConnectorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequestOrBuilder.java new file mode 100644 index 000000000000..53ff39fcfeff --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateAccountConnectorRequestOrBuilder.java @@ -0,0 +1,198 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface CreateAccountConnectorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.CreateAccountConnectorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Location resource name as the account_connector’s parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Location resource name as the account_connector’s parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The ID to use for the AccountConnector, which will become the
+   * final component of the AccountConnector's resource name. Its format should
+   * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+   * unique per-project per-location.
+   * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountConnectorId. + */ + java.lang.String getAccountConnectorId(); + + /** + * + * + *
+   * Required. The ID to use for the AccountConnector, which will become the
+   * final component of the AccountConnector's resource name. Its format should
+   * adhere to https://google.aip.dev/122#resource-id-segments Names must be
+   * unique per-project per-location.
+   * 
+ * + * string account_connector_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountConnectorId. + */ + com.google.protobuf.ByteString getAccountConnectorIdBytes(); + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + boolean hasAccountConnector(); + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector(); + + /** + * + * + *
+   * Required. The AccountConnector to create.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder getAccountConnectorOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequest.java new file mode 100644 index 000000000000..1e19c8f0d56b --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequest.java @@ -0,0 +1,1261 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Request for creating an InsightsConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.CreateInsightsConfigRequest} + */ +public final class CreateInsightsConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.CreateInsightsConfigRequest) + CreateInsightsConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateInsightsConfigRequest.newBuilder() to construct. + private CreateInsightsConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInsightsConfigRequest() { + parent_ = ""; + insightsConfigId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateInsightsConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 INSIGHTS_CONFIG_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object insightsConfigId_ = ""; + + /** + * + * + *
+   * Required. ID of the requesting InsightsConfig.
+   * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The insightsConfigId. + */ + @java.lang.Override + public java.lang.String getInsightsConfigId() { + java.lang.Object ref = insightsConfigId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + insightsConfigId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. ID of the requesting InsightsConfig.
+   * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for insightsConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInsightsConfigIdBytes() { + java.lang.Object ref = insightsConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + insightsConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSIGHTS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.developerconnect.v1.InsightsConfig insightsConfig_; + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + @java.lang.Override + public boolean hasInsightsConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig() { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigOrBuilder() { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(insightsConfigId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, insightsConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getInsightsConfig()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + 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(insightsConfigId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, insightsConfigId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInsightsConfig()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + 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.developerconnect.v1.CreateInsightsConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest other = + (com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getInsightsConfigId().equals(other.getInsightsConfigId())) return false; + if (hasInsightsConfig() != other.hasInsightsConfig()) return false; + if (hasInsightsConfig()) { + if (!getInsightsConfig().equals(other.getInsightsConfig())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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) + INSIGHTS_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getInsightsConfigId().hashCode(); + if (hasInsightsConfig()) { + hash = (37 * hash) + INSIGHTS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInsightsConfig().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest 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.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + 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.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + java.io.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.developerconnect.v1.CreateInsightsConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.CreateInsightsConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for creating an InsightsConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.CreateInsightsConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.CreateInsightsConfigRequest) + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInsightsConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + insightsConfigId_ = ""; + insightsConfig_ = null; + if (insightsConfigBuilder_ != null) { + insightsConfigBuilder_.dispose(); + insightsConfigBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest build() { + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest buildPartial() { + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest result = + new com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.insightsConfigId_ = insightsConfigId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.insightsConfig_ = + insightsConfigBuilder_ == null ? insightsConfig_ : insightsConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + 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.developerconnect.v1.CreateInsightsConfigRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest other) { + if (other + == com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInsightsConfigId().isEmpty()) { + insightsConfigId_ = other.insightsConfigId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasInsightsConfig()) { + mergeInsightsConfig(other.getInsightsConfig()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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: + { + insightsConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getInsightsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 insightsConfigId_ = ""; + + /** + * + * + *
+     * Required. ID of the requesting InsightsConfig.
+     * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The insightsConfigId. + */ + public java.lang.String getInsightsConfigId() { + java.lang.Object ref = insightsConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + insightsConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. ID of the requesting InsightsConfig.
+     * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for insightsConfigId. + */ + public com.google.protobuf.ByteString getInsightsConfigIdBytes() { + java.lang.Object ref = insightsConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + insightsConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. ID of the requesting InsightsConfig.
+     * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The insightsConfigId to set. + * @return This builder for chaining. + */ + public Builder setInsightsConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + insightsConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. ID of the requesting InsightsConfig.
+     * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInsightsConfigId() { + insightsConfigId_ = getDefaultInstance().getInsightsConfigId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. ID of the requesting InsightsConfig.
+     * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for insightsConfigId to set. + * @return This builder for chaining. + */ + public Builder setInsightsConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + insightsConfigId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.developerconnect.v1.InsightsConfig insightsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + insightsConfigBuilder_; + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + public boolean hasInsightsConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig() { + if (insightsConfigBuilder_ == null) { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } else { + return insightsConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInsightsConfig(com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insightsConfig_ = value; + } else { + insightsConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInsightsConfig( + com.google.cloud.developerconnect.v1.InsightsConfig.Builder builderForValue) { + if (insightsConfigBuilder_ == null) { + insightsConfig_ = builderForValue.build(); + } else { + insightsConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInsightsConfig(com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && insightsConfig_ != null + && insightsConfig_ + != com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance()) { + getInsightsConfigBuilder().mergeFrom(value); + } else { + insightsConfig_ = value; + } + } else { + insightsConfigBuilder_.mergeFrom(value); + } + if (insightsConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInsightsConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + insightsConfig_ = null; + if (insightsConfigBuilder_ != null) { + insightsConfigBuilder_.dispose(); + insightsConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.InsightsConfig.Builder getInsightsConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getInsightsConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder + getInsightsConfigOrBuilder() { + if (insightsConfigBuilder_ != null) { + return insightsConfigBuilder_.getMessageOrBuilder(); + } else { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + } + + /** + * + * + *
+     * Required. The resource being created.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + getInsightsConfigFieldBuilder() { + if (insightsConfigBuilder_ == null) { + insightsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder>( + getInsightsConfig(), getParentForChildren(), isClean()); + insightsConfig_ = null; + } + return insightsConfigBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.CreateInsightsConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.CreateInsightsConfigRequest) + private static final com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest(); + } + + public static com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInsightsConfigRequest 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.developerconnect.v1.CreateInsightsConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequestOrBuilder.java new file mode 100644 index 000000000000..3a82219a145a --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/CreateInsightsConfigRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface CreateInsightsConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.CreateInsightsConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the requesting InsightsConfig.
+   * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The insightsConfigId. + */ + java.lang.String getInsightsConfigId(); + + /** + * + * + *
+   * Required. ID of the requesting InsightsConfig.
+   * 
+ * + * string insights_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for insightsConfigId. + */ + com.google.protobuf.ByteString getInsightsConfigIdBytes(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + boolean hasInsightsConfig(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig(); + + /** + * + * + *
+   * Required. The resource being created.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigOrBuilder(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequest.java new file mode 100644 index 000000000000..8b13d5afa1a0 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequest.java @@ -0,0 +1,1359 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for deleting a AccountConnector
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteAccountConnectorRequest} + */ +public final class DeleteAccountConnectorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) + DeleteAccountConnectorRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteAccountConnectorRequest.newBuilder() to construct. + private DeleteAccountConnectorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAccountConnectorRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAccountConnectorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. The current etag of the AccountConnectorn.
+   * If an etag is provided and does not match the current etag of the
+   * AccountConnector, deletion will be blocked and an ABORTED error will be
+   * returned.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The current etag of the AccountConnectorn.
+   * If an etag is provided and does not match the current etag of the
+   * AccountConnector, deletion will be blocked and an ABORTED error will be
+   * returned.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 5; + private boolean force_ = false; + + /** + * + * + *
+   * Optional. If set to true, any Users from this AccountConnector will also
+   * be deleted. (Otherwise, the request will only work if the AccountConnector
+   * has no Users.)
+   * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + if (force_ != false) { + output.writeBool(5, force_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, force_); + } + 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.developerconnect.v1.DeleteAccountConnectorRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest other = + (com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getForce() != other.getForce()) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest 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.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + 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.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + java.io.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.developerconnect.v1.DeleteAccountConnectorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + parseDelimitedFrom( + java.io.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.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.DeleteAccountConnectorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a AccountConnector
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteAccountConnectorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.Builder.class); + } + + // Construct using + // com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + validateOnly_ = false; + etag_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest build() { + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest buildPartial() { + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest result = + new com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.DeleteAccountConnectorRequest) { + return mergeFrom( + (com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest other) { + if (other + == com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + force_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. The current etag of the AccountConnectorn.
+     * If an etag is provided and does not match the current etag of the
+     * AccountConnector, deletion will be blocked and an ABORTED error will be
+     * returned.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The current etag of the AccountConnectorn.
+     * If an etag is provided and does not match the current etag of the
+     * AccountConnector, deletion will be blocked and an ABORTED error will be
+     * returned.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The current etag of the AccountConnectorn.
+     * If an etag is provided and does not match the current etag of the
+     * AccountConnector, deletion will be blocked and an ABORTED error will be
+     * returned.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The current etag of the AccountConnectorn.
+     * If an etag is provided and does not match the current etag of the
+     * AccountConnector, deletion will be blocked and an ABORTED error will be
+     * returned.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The current etag of the AccountConnectorn.
+     * If an etag is provided and does not match the current etag of the
+     * AccountConnector, deletion will be blocked and an ABORTED error will be
+     * returned.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
+     * Optional. If set to true, any Users from this AccountConnector will also
+     * be deleted. (Otherwise, the request will only work if the AccountConnector
+     * has no Users.)
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
+     * Optional. If set to true, any Users from this AccountConnector will also
+     * be deleted. (Otherwise, the request will only work if the AccountConnector
+     * has no Users.)
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, any Users from this AccountConnector will also
+     * be deleted. (Otherwise, the request will only work if the AccountConnector
+     * has no Users.)
+     * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000010); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) + private static final com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest(); + } + + public static com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAccountConnectorRequest 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.developerconnect.v1.DeleteAccountConnectorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequestOrBuilder.java new file mode 100644 index 000000000000..02eafef34c6b --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteAccountConnectorRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface DeleteAccountConnectorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.DeleteAccountConnectorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The current etag of the AccountConnectorn.
+   * If an etag is provided and does not match the current etag of the
+   * AccountConnector, deletion will be blocked and an ABORTED error will be
+   * returned.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. The current etag of the AccountConnectorn.
+   * If an etag is provided and does not match the current etag of the
+   * AccountConnector, deletion will be blocked and an ABORTED error will be
+   * returned.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. If set to true, any Users from this AccountConnector will also
+   * be deleted. (Otherwise, the request will only work if the AccountConnector
+   * has no Users.)
+   * 
+ * + * bool force = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequest.java new file mode 100644 index 000000000000..a86abce2729d --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequest.java @@ -0,0 +1,1245 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ *
+ * Request for deleting an InsightsConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteInsightsConfigRequest} + */ +public final class DeleteInsightsConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) + DeleteInsightsConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteInsightsConfigRequest.newBuilder() to construct. + private DeleteInsightsConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInsightsConfigRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteInsightsConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * 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. Value for parent.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + 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.developerconnect.v1.DeleteInsightsConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest other = + (com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest 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.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + 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.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + java.io.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.developerconnect.v1.DeleteInsightsConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.DeleteInsightsConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   *
+   * Request for deleting an InsightsConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteInsightsConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + validateOnly_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest build() { + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest buildPartial() { + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest result = + new com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.DeleteInsightsConfigRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest other) { + if (other + == com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000008; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + etag_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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. Value for parent.
+     * 
+ * + * + * 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 requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.DeleteInsightsConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) + private static final com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest(); + } + + public static com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInsightsConfigRequest 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.developerconnect.v1.DeleteInsightsConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequestOrBuilder.java new file mode 100644 index 000000000000..6c89f059c8f9 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteInsightsConfigRequestOrBuilder.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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface DeleteInsightsConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.DeleteInsightsConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Value for parent.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequest.java new file mode 100644 index 000000000000..d0ddd0c98616 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequest.java @@ -0,0 +1,649 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for deleting a User of the user themselves.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteSelfRequest} + */ +public final class DeleteSelfRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.DeleteSelfRequest) + DeleteSelfRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteSelfRequest.newBuilder() to construct. + private DeleteSelfRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteSelfRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteSelfRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteSelfRequest.class, + com.google.cloud.developerconnect.v1.DeleteSelfRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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.developerconnect.v1.DeleteSelfRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.DeleteSelfRequest other = + (com.google.cloud.developerconnect.v1.DeleteSelfRequest) 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.developerconnect.v1.DeleteSelfRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest 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.developerconnect.v1.DeleteSelfRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseFrom( + 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.developerconnect.v1.DeleteSelfRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseFrom( + java.io.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.developerconnect.v1.DeleteSelfRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.DeleteSelfRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.DeleteSelfRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a User of the user themselves.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteSelfRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.DeleteSelfRequest) + com.google.cloud.developerconnect.v1.DeleteSelfRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteSelfRequest.class, + com.google.cloud.developerconnect.v1.DeleteSelfRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.DeleteSelfRequest.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.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteSelfRequest getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.DeleteSelfRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteSelfRequest build() { + com.google.cloud.developerconnect.v1.DeleteSelfRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteSelfRequest buildPartial() { + com.google.cloud.developerconnect.v1.DeleteSelfRequest result = + new com.google.cloud.developerconnect.v1.DeleteSelfRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.DeleteSelfRequest 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.developerconnect.v1.DeleteSelfRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.DeleteSelfRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.DeleteSelfRequest other) { + if (other == com.google.cloud.developerconnect.v1.DeleteSelfRequest.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. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * 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. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + 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.developerconnect.v1.DeleteSelfRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.DeleteSelfRequest) + private static final com.google.cloud.developerconnect.v1.DeleteSelfRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.DeleteSelfRequest(); + } + + public static com.google.cloud.developerconnect.v1.DeleteSelfRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSelfRequest 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.developerconnect.v1.DeleteSelfRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequestOrBuilder.java new file mode 100644 index 000000000000..b403654df687 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteSelfRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface DeleteSelfRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.DeleteSelfRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequest.java new file mode 100644 index 000000000000..e5f6d9aeeb44 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequest.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for deleting a User
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteUserRequest} + */ +public final class DeleteUserRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.DeleteUserRequest) + DeleteUserRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteUserRequest.newBuilder() to construct. + private DeleteUserRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteUserRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteUserRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteUserRequest.class, + com.google.cloud.developerconnect.v1.DeleteUserRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + 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.developerconnect.v1.DeleteUserRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.DeleteUserRequest other = + (com.google.cloud.developerconnect.v1.DeleteUserRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest 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.developerconnect.v1.DeleteUserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + 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.developerconnect.v1.DeleteUserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + java.io.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.developerconnect.v1.DeleteUserRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.DeleteUserRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.DeleteUserRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a User
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.DeleteUserRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.DeleteUserRequest) + com.google.cloud.developerconnect.v1.DeleteUserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.DeleteUserRequest.class, + com.google.cloud.developerconnect.v1.DeleteUserRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.DeleteUserRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + validateOnly_ = false; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteUserRequest getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.DeleteUserRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteUserRequest build() { + com.google.cloud.developerconnect.v1.DeleteUserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.DeleteUserRequest buildPartial() { + com.google.cloud.developerconnect.v1.DeleteUserRequest result = + new com.google.cloud.developerconnect.v1.DeleteUserRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.DeleteUserRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.DeleteUserRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.DeleteUserRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.DeleteUserRequest other) { + if (other == com.google.cloud.developerconnect.v1.DeleteUserRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000008; + 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: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + etag_ = input.readStringRequireUtf8(); + 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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. This checksum is computed by the server based on the value of
+     * other fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.DeleteUserRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.DeleteUserRequest) + private static final com.google.cloud.developerconnect.v1.DeleteUserRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.DeleteUserRequest(); + } + + public static com.google.cloud.developerconnect.v1.DeleteUserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteUserRequest 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.developerconnect.v1.DeleteUserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequestOrBuilder.java new file mode 100644 index 000000000000..8a4a86852228 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeleteUserRequestOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface DeleteUserRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.DeleteUserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
+   * Optional. This checksum is computed by the server based on the value of
+   * other fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectProto.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectProto.java index a5078814c28d..12ca75f09a3d 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectProto.java +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/DeveloperConnectProto.java @@ -28,6 +28,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListUsersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListUsersResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_developerconnect_v1_Connection_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -44,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_developerconnect_v1_CryptoKeyConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_developerconnect_v1_CryptoKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GitProxyConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_developerconnect_v1_InstallationState_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -76,6 +88,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_developerconnect_v1_GitLabEnterpriseConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_developerconnect_v1_GitLabEnterpriseConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_developerconnect_v1_ListConnectionsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -100,10 +120,58 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_developerconnect_v1_DeleteConnectionRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_developerconnect_v1_DeleteConnectionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_developerconnect_v1_OperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_developerconnect_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ExchangeError_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -184,6 +252,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_developerconnect_v1_FetchGitRefsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_developerconnect_v1_FetchGitRefsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_AccountConnector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_User_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_User_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -200,50 +288,68 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "field_behavior.proto\032\033google/api/field_i" + "nfo.proto\032\031google/api/resource.proto\032#go" + "ogle/longrunning/operations.proto\032\033google/protobuf/empty.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\307\t\n\n" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\255\001\n" + + "\020ListUsersRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$developerconnect.googleapis.com/User\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"x\n" + + "\021ListUsersResponse\0225\n" + + "\005users\030\001 \003(\0132&.google.cloud.developerconnect.v1.User\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\327\013\n\n" + "Connection\022G\n\r" + "github_config\030\005" + " \001(\0132..google.cloud.developerconnect.v1.GitHubConfigH\000\022\\\n" + "\030github_enterprise_config\030\r" + " \001(\01328.google.cloud.developerconnect.v1.GitHubEnterpriseConfigH\000\022G\n\r" - + "gitlab_config\030\016" - + " \001(\0132..google.cloud.developerconnect.v1.GitLabConfigH\000\022\\\n" - + "\030gitlab_enterprise_config\030\020 \001(\01328.google.cloud.develo" - + "perconnect.v1.GitLabEnterpriseConfigH\000\022\021\n" + + "gitlab_config\030\016 \001(\0132..googl" + + "e.cloud.developerconnect.v1.GitLabConfigH\000\022\\\n" + + "\030gitlab_enterprise_config\030\020 \001(\01328.g" + + "oogle.cloud.developerconnect.v1.GitLabEnterpriseConfigH\000\022c\n" + + "\034bitbucket_data_center_config\030\021" + + " \001(\0132;.google.cloud.developerconnect.v1.BitbucketDataCenterConfigH\000\022X\n" + + "\026bitbucket_cloud_config\030\022 \001(\01326.google.c" + + "loud.developerconnect.v1.BitbucketCloudConfigH\000\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\0224\n" + "\013delete_time\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022M\n" - + "\006labels\030\004 \003(\01328.go" - + "ogle.cloud.developerconnect.v1.Connection.LabelsEntryB\003\340A\001\022T\n" + + "\006labels\030\004" + + " \003(\01328.google.cloud.developerconnect.v1.Connection.LabelsEntryB\003\340A\001\022T\n" + "\022installation_state\030\006" + " \001(\01323.google.cloud.developerconnect.v1.InstallationStateB\003\340A\003\022\025\n" + "\010disabled\030\007 \001(\010B\003\340A\001\022\030\n" + "\013reconciling\030\010 \001(\010B\003\340A\003\022W\n" - + "\013annotations\030\t \003(\0132=.google.cloud.developerc" - + "onnect.v1.Connection.AnnotationsEntryB\003\340A\001\022\021\n" + + "\013annotations\030\t \003(\0132=.google.cloud.d" + + "eveloperconnect.v1.Connection.AnnotationsEntryB\003\340A\001\022\021\n" + "\004etag\030\n" + " \001(\tB\003\340A\001\022\030\n" + "\003uid\030\014 \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022Q\n" - + "\021crypto_key_config\030\017 \001(\01321.goo" - + "gle.cloud.developerconnect.v1.CryptoKeyConfigB\003\340A\001\032-\n" + + "\021crypto_key_config\030\017 " + + "\001(\01321.google.cloud.developerconnect.v1.CryptoKeyConfigB\003\340A\001\022O\n" + + "\020git_proxy_config\030\023" + + " \001(\01320.google.cloud.developerconnect.v1.GitProxyConfigB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r" - + "\n" + + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\0322\n" + "\020AnnotationsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\216\001\352A\212\001\n" - + "*developerconnect.googleapis.com/Connection\022@projects/{project}/locations/{location" - + "}/connections/{connection}*\013connections2\n" + + "*developerconnect.googleapis.com/Connection\022@projects/{project}/locations" + + "/{location}/connections/{connection}*\013connections2\n" + "connectionR\001\001B\023\n" + "\021connection_config\"S\n" + "\017CryptoKeyConfig\022@\n\r" + "key_reference\030\001 \001(\tB)\340A\002\372A#\n" - + "!cloudkms.googleapis.com/CryptoKey\"\210\002\n" + + "!cloudkms.googleapis.com/CryptoKey\"&\n" + + "\016GitProxyConfig\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\"\210\002\n" + "\021InstallationState\022M\n" - + "\005stage\030\001 \001(\01629." - + "google.cloud.developerconnect.v1.InstallationState.StageB\003\340A\003\022\024\n" + + "\005stage\030\001" + + " \001(\01629.google.cloud.developerconnect.v1.InstallationState.StageB\003\340A\003\022\024\n" + "\007message\030\002 \001(\tB\003\340A\003\022\027\n\n" + "action_uri\030\003 \001(\tB\003\340A\003\"u\n" + "\005Stage\022\025\n" @@ -254,10 +360,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010COMPLETE\020\n" + "\"\313\002\n" + "\014GitHubConfig\022T\n\n" - + "github_app\030\001 \001(\01628.google.cloud." - + "developerconnect.v1.GitHubConfig.GitHubAppB\006\340A\002\340A\005\022U\n" - + "\025authorizer_credential\030\002 \001(" - + "\01321.google.cloud.developerconnect.v1.OAuthCredentialB\003\340A\001\022 \n" + + "github_app\030\001 \001(\01628.goo" + + "gle.cloud.developerconnect.v1.GitHubConfig.GitHubAppB\006\340A\002\340A\005\022U\n" + + "\025authorizer_credential\030\002" + + " \001(\01321.google.cloud.developerconnect.v1.OAuthCredentialB\003\340A\001\022 \n" + "\023app_installation_id\030\003 \001(\003B\003\340A\001\022\035\n" + "\020installation_uri\030\004 \001(\tB\003\340A\003\"M\n" + "\tGitHubApp\022\033\n" @@ -275,7 +381,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023app_installation_id\030\010 \001(\003B\003\340A\001\022\035\n" + "\020installation_uri\030\t \001(\tB\003\340A\003\022_\n" + "\030service_directory_config\030\n" - + " \001(\01328.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\003\340A\001\022\033\n" + + " \001(\01328.google.cloud.d" + + "eveloperconnect.v1.ServiceDirectoryConfigB\003\340A\001\022\033\n" + "\016server_version\030\014 \001(\tB\003\340A\003\022\037\n" + "\022ssl_ca_certificate\030\016 \001(\tB\003\340A\001\"Z\n" + "\026ServiceDirectoryConfig\022@\n" @@ -288,10 +395,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014GitLabConfig\022\\\n" + "\035webhook_secret_secret_version\030\001 \001(\tB5\340A\002\340A\005\372A,\n" + "*secretmanager.googleapis.com/SecretVersion\022Y\n" - + "\032read_authorizer_credential\030\002 \001(\01320.google.cl" - + "oud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" - + "\025authorizer_credential\030\003 \001(\01320.goo" - + "gle.cloud.developerconnect.v1.UserCredentialB\003\340A\002\"~\n" + + "\032read_authorizer_credential\030\002 \001(\01320" + + ".google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" + + "\025authorizer_credential\030\003" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\"~\n" + "\016UserCredential\022U\n" + "\031user_token_secret_version\030\001 \001(\tB2\340A\002\372A,\n" + "*secretmanager.googleapis.com/SecretVersion\022\025\n" @@ -300,17 +407,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010host_uri\030\001 \001(\tB\003\340A\002\022\\\n" + "\035webhook_secret_secret_version\030\002 \001(\tB5\340A\002\340A\005\372A,\n" + "*secretmanager.googleapis.com/SecretVersion\022Y\n" - + "\032read_authorizer_credential\030\003 \001(\01320." - + "google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" - + "\025authorizer_credential\030\004 " - + "\001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022_\n" - + "\030service_directory_config\030\005" - + " \001(\01328.google.cloud.developerconnect.v1.ServiceDirectoryConfigB\003\340A\001\022\037\n" + + "\032read_authorizer_credential\030\003" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" + + "\025authorizer_credential\030\004" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022_\n" + + "\030service_directory_config\030\005 \001(\01328.google.cloud.de" + + "veloperconnect.v1.ServiceDirectoryConfigB\003\340A\001\022\037\n" + + "\022ssl_ca_certificate\030\006 \001(\tB\003\340A\001\022\033\n" + + "\016server_version\030\007 \001(\tB\003\340A\003\"\340\003\n" + + "\031BitbucketDataCenterConfig\022\025\n" + + "\010host_uri\030\001 \001(\tB\003\340A\002\022\\\n" + + "\035webhook_secret_secret_version\030\002 \001(\tB5\340A\002\340A\005\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022Y\n" + + "\032read_authorizer_credential\030\003" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" + + "\025authorizer_credential\030\004" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022_\n" + + "\030service_directory_config\030\005 \001(\01328.google.cloud" + + ".developerconnect.v1.ServiceDirectoryConfigB\003\340A\001\022\037\n" + "\022ssl_ca_certificate\030\006 \001(\tB\003\340A\001\022\033\n" - + "\016server_version\030\007 \001(\tB\003\340A\003\"\271\001\n" + + "\016server_version\030\007 \001(\tB\003\340A\003\"\275\002\n" + + "\024BitbucketCloudConfig\022\026\n" + + "\tworkspace\030\001 \001(\tB\003\340A\002\022\\\n" + + "\035webhook_secret_secret_version\030\002 \001(\tB5\340A\002\340A\005\372A,\n" + + "*secretmanager.googleapis.com/SecretVersion\022Y\n" + + "\032read_authorizer_credential\030\003" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\022T\n" + + "\025authorizer_credential\030\004" + + " \001(\01320.google.cloud.developerconnect.v1.UserCredentialB\003\340A\002\"\271\001\n" + "\026ListConnectionsRequest\022B\n" - + "\006parent\030\001 \001(" - + "\tB2\340A\002\372A,\022*developerconnect.googleapis.com/Connection\022\026\n" + + "\006parent\030\001 \001(\tB2\340A\002\372A" + + ",\022*developerconnect.googleapis.com/Connection\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" @@ -324,18 +451,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB2\340A\002\372A,\n" + "*developerconnect.googleapis.com/Connection\"\375\001\n" + "\027CreateConnectionRequest\022B\n" - + "\006parent\030\001 \001(\t" - + "B2\340A\002\372A,\022*developerconnect.googleapis.com/Connection\022\032\n\r" + + "\006parent\030\001 \001(" + + "\tB2\340A\002\372A,\022*developerconnect.googleapis.com/Connection\022\032\n\r" + "connection_id\030\002 \001(\tB\003\340A\002\022E\n\n" - + "connection\030\003" - + " \001(\0132,.google.cloud.developerconnect.v1.ConnectionB\003\340A\002\022\037\n\n" - + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "connection\030\003 \001(\0132,.goog" + + "le.cloud.developerconnect.v1.ConnectionB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n" + + "\r" + "validate_only\030\005 \001(\010B\003\340A\001\"\357\001\n" + "\027UpdateConnectionRequest\0224\n" + "\013update_mask\030\001" + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022E\n\n" - + "connection\030\002 \001(\0132,.goo" - + "gle.cloud.developerconnect.v1.ConnectionB\003\340A\002\022\037\n\n" + + "connection\030\002" + + " \001(\0132,.google.cloud.developerconnect.v1.ConnectionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + "allow_missing\030\004 \001(\010B\003\340A\001\022\032\n\r" + "validate_only\030\005 \001(\010B\003\340A\001\"\253\001\n" @@ -344,6 +472,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*developerconnect.googleapis.com/Connection\022\037\n\n" + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + "validate_only\030\003 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\004 \001(\tB\003\340A\001\"\305\001\n" + + "\034ListAccountConnectorsRequest\022H\n" + + "\006parent\030\001 \001(" + + "\tB8\340A\002\372A2\0220developerconnect.googleapis.com/AccountConnector\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\235\001\n" + + "\035ListAccountConnectorsResponse\022N\n" + + "\022account_connectors\030\001" + + " \003(\01322.google.cloud.developerconnect.v1.AccountConnector\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"d\n" + + "\032GetAccountConnectorRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0developerconnect.googleapis.com/AccountConnector\"\235\002\n" + + "\035CreateAccountConnectorRequest\022H\n" + + "\006parent\030\001 \001(\tB8\340A\002\372A" + + "2\0220developerconnect.googleapis.com/AccountConnector\022!\n" + + "\024account_connector_id\030\002 \001(\tB\003\340A\002\022R\n" + + "\021account_connector\030\003 \001(\01322.goog" + + "le.cloud.developerconnect.v1.AccountConnectorB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\005 \001(\010B\003\340A\001\"\202\002\n" + + "\035UpdateAccountConnectorRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022R\n" + + "\021account_connector\030\002 \001(\01322.google.clou" + + "d.developerconnect.v1.AccountConnectorB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "allow_missing\030\004 \001(\010B\003\340A\001\022\032\n\r" + + "validate_only\030\005 \001(\010B\003\340A\001\"\313\001\n" + + "\035DeleteAccountConnectorRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0developerconnect.googleapis.com/AccountConnector\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\004 \001(\tB\003\340A\001\022\022\n" + + "\005force\030\005 \001(\010B\003\340A\001\"\237\001\n" + + "\021DeleteUserRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$developerconnect.googleapis.com/User\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\022\021\n" + "\004etag\030\004 \001(\tB\003\340A\001\"\200\002\n" + "\021OperationMetadata\0224\n" + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" @@ -352,36 +523,55 @@ 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\"\250\006\n" + + "\013api_version\030\007 \001(\tB\003\340A\003\"Z\n" + + "\020FetchSelfRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0developerconnect.googleapis.com/AccountConnector\"[\n" + + "\021DeleteSelfRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0developerconnect.googleapis.com/AccountConnector\"n\n" + + "\027FetchAccessTokenRequest\022S\n" + + "\021account_connector\030\001 \001(\tB8\340A\002\372A2\n" + + "0developerconnect.googleapis.com/AccountConnector\"\267\001\n" + + "\030FetchAccessTokenResponse\022\r\n" + + "\005token\030\001 \001(\t\0223\n" + + "\017expiration_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\016\n" + + "\006scopes\030\003 \003(\t\022G\n" + + "\016exchange_error\030\004 \001(\0132/.goog" + + "le.cloud.developerconnect.v1.ExchangeError\"2\n\r" + + "ExchangeError\022\014\n" + + "\004code\030\001 \001(\t\022\023\n" + + "\013description\030\002 \001(\t\"\304\006\n" + "\021GitRepositoryLink\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\026\n" + "\tclone_uri\030\002 \001(\tB\003\340A\002\0224\n" + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013delete_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022T\n" - + "\006labels\030\006 \003(\0132?.google.cloud.developerconne" - + "ct.v1.GitRepositoryLink.LabelsEntryB\003\340A\001\022\021\n" + + "\006labels\030\006 \003(\0132?.google.cloud.develop" + + "erconnect.v1.GitRepositoryLink.LabelsEntryB\003\340A\001\022\021\n" + "\004etag\030\007 \001(\tB\003\340A\001\022\030\n" + "\013reconciling\030\010 \001(\010B\003\340A\003\022^\n" - + "\013annotations\030\t \003(\0132D.google.clou" - + "d.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\003\340A\001\022\030\n" + + "\013annotations\030\t \003(\0132D.goog" + + "le.cloud.developerconnect.v1.GitRepositoryLink.AnnotationsEntryB\003\340A\001\022\030\n" + "\003uid\030\n" + " \001(\tB\013\340A\003\342\214\317\327\010\002\010\001\022\027\n\n" - + "webhook_id\030\013 \001(\tB\003\340A\003\032-\n" + + "webhook_id\030\013 \001(\tB\003\340A\003\022\032\n\r" + + "git_proxy_uri\030\014 \001(\tB\003\340A\003\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\0322\n" + "\020AnnotationsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\314\001\352A\310\001\n" - + "1developerconnect.googleapis.com/GitRepositoryLink\022iprojects/" - + "{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_" - + "repository_link}*\022gitRepositoryLinks2\021gitRepositoryLinkR\001\001\"\244\002\n" + + "1developerconnect.googleapis.com/GitRepositoryLink\022iprojects/{proj" + + "ect}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repos" + + "itory_link}*\022gitRepositoryLinks2\021gitRepositoryLinkR\001\001\"\244\002\n" + "\036CreateGitRepositoryLinkRequest\022I\n" - + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221d" - + "eveloperconnect.googleapis.com/GitRepositoryLink\022U\n" - + "\023git_repository_link\030\002 \001(\01323." - + "google.cloud.developerconnect.v1.GitRepositoryLinkB\003\340A\002\022#\n" + + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221develo" + + "perconnect.googleapis.com/GitRepositoryLink\022U\n" + + "\023git_repository_link\030\002 \001(\01323.googl" + + "e.cloud.developerconnect.v1.GitRepositoryLinkB\003\340A\002\022#\n" + "\026git_repository_link_id\030\003 \001(\tB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + "validate_only\030\005 \001(\010B\003\340A\001\"\271\001\n" @@ -392,15 +582,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "validate_only\030\003 \001(\010B\003\340A\001\022\021\n" + "\004etag\030\004 \001(\tB\003\340A\001\"\307\001\n" + "\035ListGitRepositoryLinksRequest\022I\n" - + "\006parent\030\001 \001(\tB9\340A\002\372A3\022" - + "1developerconnect.googleapis.com/GitRepositoryLink\022\026\n" + + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221deve" + + "loperconnect.googleapis.com/GitRepositoryLink\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + "\010order_by\030\005 \001(\tB\003\340A\001\"\241\001\n" + "\036ListGitRepositoryLinksResponse\022Q\n" - + "\024git_repository_links\030\001" - + " \003(\01323.google.cloud.developerconnect.v1.GitRepositoryLink\022\027\n" + + "\024git_repository_links\030\001 " + + "\003(\01323.google.cloud.developerconnect.v1.GitRepositoryLink\022\027\n" + "\017next_page_token\030\002 \001(\t\022\023\n" + "\013unreachable\030\003 \003(\t\"f\n" + "\033GetGitRepositoryLinkRequest\022G\n" @@ -426,18 +616,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\"\233\001\n" + "$FetchLinkableGitRepositoriesResponse\022Z\n" - + "\031linkable_git_repositories\030\001 \003(\01327.g" - + "oogle.cloud.developerconnect.v1.LinkableGitRepository\022\027\n" + + "\031linkable_git_repositories\030\001 \003(\01327.google" + + ".cloud.developerconnect.v1.LinkableGitRepository\022\027\n" + "\017next_page_token\030\002 \001(\t\"*\n" + "\025LinkableGitRepository\022\021\n" + "\tclone_uri\030\001 \001(\t\"i\n" - + "\037FetchGitHubInstallationsRequest\022F\n" - + "\n" + + "\037FetchGitHubInstallationsRequest\022F\n\n" + "connection\030\001 \001(\tB2\340A\002\372A,\n" + "*developerconnect.googleapis.com/Connection\"\302\001\n" + " FetchGitHubInstallationsResponse\022f\n\r" - + "installations\030\001 \003(\0132O.google.cloud.developerconnec" - + "t.v1.FetchGitHubInstallationsResponse.Installation\0326\n" + + "installations\030\001 \003(\0132O.google.cloud.developerconnect.v1." + + "FetchGitHubInstallationsResponse.Installation\0326\n" + "\014Installation\022\n\n" + "\002id\030\001 \001(\003\022\014\n" + "\004name\030\002 \001(\t\022\014\n" @@ -445,8 +634,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023FetchGitRefsRequest\022V\n" + "\023git_repository_link\030\001 \001(\tB9\340A\002\372A3\n" + "1developerconnect.googleapis.com/GitRepositoryLink\022T\n" - + "\010ref_type\030\002 \001(\0162=.g" - + "oogle.cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\003\340A\002\022\026\n" + + "\010ref_type\030\002 \001(\0162=.google" + + ".cloud.developerconnect.v1.FetchGitRefsRequest.RefTypeB\003\340A\002\022\026\n" + "\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\005 \001(\tB\003\340A\001\"8\n" + "\007RefType\022\030\n" @@ -455,89 +644,207 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006BRANCH\020\002\"B\n" + "\024FetchGitRefsResponse\022\021\n" + "\tref_names\030\001 \003(\t\022\027\n" - + "\017next_page_token\030\002 \001(\t2\247\034\n" + + "\017next_page_token\030\002 \001(\t\"\375\005\n" + + "\020AccountConnector\022V\n" + + "\025provider_oauth_config\030\005" + + " \001(\01325.google.cloud.developerconnect.v1.ProviderOAuthConfigH\000\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" + + "\013annotations\030\006 \003(\0132C.google.cloud.developerconn" + + "ect.v1.AccountConnector.AnnotationsEntryB\003\340A\001\022\021\n" + + "\004etag\030\007 \001(\tB\003\340A\001\022S\n" + + "\006labels\030\010 \003(\013" + + "2>.google.cloud.developerconnect.v1.AccountConnector.LabelsEntryB\003\340A\001\022\034\n" + + "\017oauth_start_uri\030\n" + + " \001(\tB\003\340A\003\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\255\001\352A\251\001\n" + + "0developerconnect.googleapis.com/AccountConnector\022Mprojects/{project}/loca" + + "tions/{location}/accountConnectors/{acco" + + "unt_connector}*\021accountConnectors2\020accountConnectorR\001\001B\032\n" + + "\030account_connector_config\"\302\002\n" + + "\004User\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\003\0224\n" + + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022@\n" + + "\027last_token_request_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003:\223\001\352A\217\001\n" + + "$developerconnect.googleapis.com/User\022Zprojects/{projec" + + "t}/locations/{location}/accountConnector" + + "s/{account_connector}/users/{user}*\005users2\004user\"\224\001\n" + + "\023ProviderOAuthConfig\022S\n" + + "\022system_provider_id\030\001" + + " \001(\01620.google.cloud.developerconnect.v1.SystemProviderB\003\340A\005H\000\022\023\n" + + "\006scopes\030\002 \003(\tB\003\340A\002B\023\n" + + "\021oauth_provider_id*\227\001\n" + + "\016SystemProvider\022\037\n" + + "\033SYSTEM_PROVIDER_UNSPECIFIED\020\000\022\n\n" + + "\006GITHUB\020\001\022\n\n" + + "\006GITLAB\020\002\022\n\n" + + "\006GOOGLE\020\003\022\n\n" + + "\006SENTRY\020\004\022\010\n" + + "\004ROVO\020\005\022\r\n" + + "\tNEW_RELIC\020\006\022\014\n" + + "\010DATASTAX\020\007\022\r\n" + + "\tDYNATRACE\020\0102\351.\n" + "\020DeveloperConnect\022\310\001\n" - + "\017ListConnections\0228.google.cloud.developerconnect.v1.List" - + "ConnectionsRequest\0329.google.cloud.develo" - + "perconnect.v1.ListConnectionsResponse\"@\332" - + "A\006parent\202\323\344\223\0021\022//v1/{parent=projects/*/locations/*}/connections\022\265\001\n\r" - + "GetConnection\0226.google.cloud.developerconnect.v1.Get" - + "ConnectionRequest\032,.google.cloud.develop" - + "erconnect.v1.Connection\">\332A\004name\202\323\344\223\0021\022/" - + "/v1/{name=projects/*/locations/*/connections/*}\022\366\001\n" - + "\020CreateConnection\0229.google.cloud.developerconnect.v1.CreateConnection" - + "Request\032\035.google.longrunning.Operation\"\207\001\312A\037\n\n" - + "Connection\022\021OperationMetadata\332A\037pa" - + "rent,connection,connection_id\202\323\344\223\002=\"//v1" - + "/{parent=projects/*/locations/*}/connections:\n" + + "\017ListConnections\0228.google.cloud.developerconnect.v1.ListConnect" + + "ionsRequest\0329.google.cloud.developerconn" + + "ect.v1.ListConnectionsResponse\"@\332A\006paren" + + "t\202\323\344\223\0021\022//v1/{parent=projects/*/locations/*}/connections\022\265\001\n\r" + + "GetConnection\0226.google.cloud.developerconnect.v1.GetConnect" + + "ionRequest\032,.google.cloud.developerconne" + + "ct.v1.Connection\">\332A\004name\202\323\344\223\0021\022//v1/{na" + + "me=projects/*/locations/*/connections/*}\022\366\001\n" + + "\020CreateConnection\0229.google.cloud.dev" + + "eloperconnect.v1.CreateConnectionRequest\032\035.google.longrunning.Operation\"\207\001\312A\037\n\n" + + "Connection\022\021OperationMetadata\332A\037parent,co" + + "nnection,connection_id\202\323\344\223\002=\"//v1/{parent=projects/*/locations/*}/connections:\n" + "connection\022\370\001\n" - + "\020UpdateConnection\0229.google.cloud.developerconnect.v1.UpdateC" - + "onnectionRequest\032\035.google.longrunning.Operation\"\211\001\312A\037\n\n" - + "Connection\022\021OperationMeta" - + "data\332A\026connection,update_mask\202\323\344\223\002H2:/v1" - + "/{connection.name=projects/*/locations/*/connections/*}:\n" + + "\020UpdateConnection\0229.google.cloud.developerconnect.v1.UpdateConnecti" + + "onRequest\032\035.google.longrunning.Operation\"\211\001\312A\037\n\n" + + "Connection\022\021OperationMetadata\332A\026" + + "connection,update_mask\202\323\344\223\002H2:/v1/{conne" + + "ction.name=projects/*/locations/*/connections/*}:\n" + "connection\022\331\001\n" - + "\020DeleteConnection\0229.google.cloud.developerconnect" - + ".v1.DeleteConnectionRequest\032\035.google.longrunning.Operation\"k\312A*\n" - + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0021*/" - + "/v1/{name=projects/*/locations/*/connections/*}\022\273\002\n" - + "\027CreateGitRepositoryLink\022@.google.cloud.developerconnect.v1.CreateGit" - + "RepositoryLinkRequest\032\035.google.longrunning.Operation\"\276\001\312A&\n" - + "\021GitRepositoryLink\022\021OperationMetadata\332A1parent,git_repository" - + "_link,git_repository_link_id\202\323\344\223\002[\"D/v1/" - + "{parent=projects/*/locations/*/connectio" - + "ns/*}/gitRepositoryLinks:\023git_repository_link\022\375\001\n" - + "\027DeleteGitRepositoryLink\022@.google.cloud.developerconnect.v1.DeleteGitRe" - + "positoryLinkRequest\032\035.google.longrunning.Operation\"\200\001\312A*\n" + + "\020DeleteConnection\0229.google.cloud.developerconnect.v1.Del" + + "eteConnectionRequest\032\035.google.longrunning.Operation\"k\312A*\n" + "\025google.protobuf.Empty\022" - + "\021OperationMetadata\332A\004name\202\323\344\223\002F*D/v1/{na" - + "me=projects/*/locations/*/connections/*/gitRepositoryLinks/*}\022\362\001\n" - + "\026ListGitRepositoryLinks\022?.google.cloud.developerconnect" - + ".v1.ListGitRepositoryLinksRequest\032@.google.cloud.developerconnect.v1.ListGitRepo" - + "sitoryLinksResponse\"U\332A\006parent\202\323\344\223\002F\022D/v" - + "1/{parent=projects/*/locations/*/connections/*}/gitRepositoryLinks\022\337\001\n" - + "\024GetGitRepositoryLink\022=.google.cloud.developerconn" - + "ect.v1.GetGitRepositoryLinkRequest\0323.google.cloud.developerconnect.v1.GitReposit" - + "oryLink\"S\332A\004name\202\323\344\223\002F\022D/v1/{name=projec" - + "ts/*/locations/*/connections/*/gitRepositoryLinks/*}\022\235\002\n" - + "\023FetchReadWriteToken\022<.google.cloud.developerconnect.v1.FetchRea" - + "dWriteTokenRequest\032=.google.cloud.developerconnect.v1.FetchReadWriteTokenRespons" - + "e\"\210\001\332A\023git_repository_link\202\323\344\223\002l\"g/v1/{g" - + "it_repository_link=projects/*/locations/" - + "*/connections/*/gitRepositoryLinks/*}:fetchReadWriteToken:\001*\022\211\002\n" - + "\016FetchReadToken\0227.google.cloud.developerconnect.v1.Fetch" - + "ReadTokenRequest\0328.google.cloud.develope" - + "rconnect.v1.FetchReadTokenResponse\"\203\001\332A\023" - + "git_repository_link\202\323\344\223\002g\"b/v1/{git_repo" + + "\021OperationMetadata\332A\004name\202\323\344\223\0021*//v1/{na" + + "me=projects/*/locations/*/connections/*}\022\273\002\n" + + "\027CreateGitRepositoryLink\022@.google.cloud.developerconnect.v1.CreateGitReposit" + + "oryLinkRequest\032\035.google.longrunning.Operation\"\276\001\312A&\n" + + "\021GitRepositoryLink\022\021OperationMetadata\332A1parent,git_repository_link,g" + + "it_repository_link_id\202\323\344\223\002[\"D/v1/{parent" + + "=projects/*/locations/*/connections/*}/g" + + "itRepositoryLinks:\023git_repository_link\022\375\001\n" + + "\027DeleteGitRepositoryLink\022@.google.cloud.developerconnect.v1.DeleteGitRepositor" + + "yLinkRequest\032\035.google.longrunning.Operation\"\200\001\312A*\n" + + "\025google.protobuf.Empty\022\021Operat" + + "ionMetadata\332A\004name\202\323\344\223\002F*D/v1/{name=proj" + + "ects/*/locations/*/connections/*/gitRepositoryLinks/*}\022\362\001\n" + + "\026ListGitRepositoryLinks\022?.google.cloud.developerconnect.v1.Lis" + + "tGitRepositoryLinksRequest\032@.google.cloud.developerconnect.v1.ListGitRepositoryL" + + "inksResponse\"U\332A\006parent\202\323\344\223\002F\022D/v1/{pare" + + "nt=projects/*/locations/*/connections/*}/gitRepositoryLinks\022\337\001\n" + + "\024GetGitRepositoryLink\022=.google.cloud.developerconnect.v1." + + "GetGitRepositoryLinkRequest\0323.google.cloud.developerconnect.v1.GitRepositoryLink" + + "\"S\332A\004name\202\323\344\223\002F\022D/v1/{name=projects/*/lo" + + "cations/*/connections/*/gitRepositoryLinks/*}\022\235\002\n" + + "\023FetchReadWriteToken\022<.google.cloud.developerconnect.v1.FetchReadWriteT" + + "okenRequest\032=.google.cloud.developerconn" + + "ect.v1.FetchReadWriteTokenResponse\"\210\001\332A\023" + + "git_repository_link\202\323\344\223\002l\"g/v1/{git_repo" + "sitory_link=projects/*/locations/*/conne" - + "ctions/*/gitRepositoryLinks/*}:fetchReadToken:\001*\022\226\002\n" - + "\034FetchLinkableGitRepositories\022E.google.cloud.developerconnect.v1.Fet" - + "chLinkableGitRepositoriesRequest\032F.googl" - + "e.cloud.developerconnect.v1.FetchLinkableGitRepositoriesResponse\"g\332A\n" - + "connection\202\323\344\223\002T\022R/v1/{connection=projects/*/locati" - + "ons/*/connections/*}:fetchLinkableGitRepositories\022\206\002\n" - + "\030FetchGitHubInstallations\022A.google.cloud.developerconnect.v1.FetchG" - + "itHubInstallationsRequest\032B.google.cloud" - + ".developerconnect.v1.FetchGitHubInstallationsResponse\"c\332A\n" - + "connection\202\323\344\223\002P\022N/v1/" - + "{connection=projects/*/locations/*/connections/*}:fetchGitHubInstallations\022\207\002\n" - + "\014FetchGitRefs\0225.google.cloud.developerconn" - + "ect.v1.FetchGitRefsRequest\0326.google.cloud.developerconnect.v1.FetchGitRefsRespon" - + "se\"\207\001\332A\034git_repository_link,ref_type\202\323\344\223" - + "\002b\022`/v1/{git_repository_link=projects/*/locations/*/connections/*/gitRepositoryL" - + "inks/*}:fetchGitRefs\032S\312A\037developerconnec" - + "t.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\370\004\n" - + "$com.google.cloud.developerconnect.v1B\025DeveloperCon" - + "nectProtoP\001ZPcloud.google.com/go/develop" - + "erconnect/apiv1/developerconnectpb;developerconnectpb\242\002\020DeveloperConnect\252\002" - + " Google.Cloud.DeveloperConnect.V1\312\002 Google\\Clo" - + "ud\\DeveloperConnect\\V1\352\002#Google::Cloud::DeveloperConnect::V1\352Ak\n" - + "*secretmanager.googleapis.com/SecretVersion\022=projects/{p" - + "roject}/secrets/{secret}/versions/{secret_version}\352Ax\n" - + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/locations/{" - + "location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\352A|\n" - + "\'servicedirectory.googleapis.com/Service\022Qprojects/{project}/lo" - + "cations/{location}/namespaces/{namespace}/services/{service}b\006proto3" + + "ctions/*/gitRepositoryLinks/*}:fetchReadWriteToken:\001*\022\211\002\n" + + "\016FetchReadToken\0227.google.cloud.developerconnect.v1.FetchReadTok" + + "enRequest\0328.google.cloud.developerconnec" + + "t.v1.FetchReadTokenResponse\"\203\001\332A\023git_rep" + + "ository_link\202\323\344\223\002g\"b/v1/{git_repository_" + + "link=projects/*/locations/*/connections/*/gitRepositoryLinks/*}:fetchReadToken:\001", + "*\022\226\002\n\034FetchLinkableGitRepositories\022E.goo" + + "gle.cloud.developerconnect.v1.FetchLinka" + + "bleGitRepositoriesRequest\032F.google.cloud" + + ".developerconnect.v1.FetchLinkableGitRep" + + "ositoriesResponse\"g\332A\nconnection\202\323\344\223\002T\022R" + + "/v1/{connection=projects/*/locations/*/c" + + "onnections/*}:fetchLinkableGitRepositori" + + "es\022\206\002\n\030FetchGitHubInstallations\022A.google" + + ".cloud.developerconnect.v1.FetchGitHubIn" + + "stallationsRequest\032B.google.cloud.develo" + + "perconnect.v1.FetchGitHubInstallationsRe" + + "sponse\"c\332A\nconnection\202\323\344\223\002P\022N/v1/{connec" + + "tion=projects/*/locations/*/connections/" + + "*}:fetchGitHubInstallations\022\207\002\n\014FetchGit" + + "Refs\0225.google.cloud.developerconnect.v1." + + "FetchGitRefsRequest\0326.google.cloud.devel" + + "operconnect.v1.FetchGitRefsResponse\"\207\001\332A" + + "\034git_repository_link,ref_type\202\323\344\223\002b\022`/v1" + + "/{git_repository_link=projects/*/locatio" + + "ns/*/connections/*/gitRepositoryLinks/*}" + + ":fetchGitRefs\022\340\001\n\025ListAccountConnectors\022" + + ">.google.cloud.developerconnect.v1.ListA" + + "ccountConnectorsRequest\032?.google.cloud.d" + + "eveloperconnect.v1.ListAccountConnectors" + + "Response\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=p" + + "rojects/*/locations/*}/accountConnectors" + + "\022\315\001\n\023GetAccountConnector\022<.google.cloud." + + "developerconnect.v1.GetAccountConnectorR" + + "equest\0322.google.cloud.developerconnect.v" + + "1.AccountConnector\"D\332A\004name\202\323\344\223\0027\0225/v1/{" + + "name=projects/*/locations/*/accountConne" + + "ctors/*}\022\243\002\n\026CreateAccountConnector\022?.go" + + "ogle.cloud.developerconnect.v1.CreateAcc" + + "ountConnectorRequest\032\035.google.longrunnin" + + "g.Operation\"\250\001\312A%\n\020AccountConnector\022\021Ope" + + "rationMetadata\332A-parent,account_connecto" + + "r,account_connector_id\202\323\344\223\002J\"5/v1/{paren" + + "t=projects/*/locations/*}/accountConnect" + + "ors:\021account_connector\022\245\002\n\026UpdateAccount" + + "Connector\022?.google.cloud.developerconnec" + + "t.v1.UpdateAccountConnectorRequest\032\035.goo" + + "gle.longrunning.Operation\"\252\001\312A%\n\020Account" + + "Connector\022\021OperationMetadata\332A\035account_c" + + "onnector,update_mask\202\323\344\223\002\\2G/v1/{account" + + "_connector.name=projects/*/locations/*/a" + + "ccountConnectors/*}:\021account_connector\022\353" + + "\001\n\026DeleteAccountConnector\022?.google.cloud" + + ".developerconnect.v1.DeleteAccountConnec" + + "torRequest\032\035.google.longrunning.Operatio" + + "n\"q\312A*\n\025google.protobuf.Empty\022\021Operation" + + "Metadata\332A\004name\202\323\344\223\0027*5/v1/{name=project" + + "s/*/locations/*/accountConnectors/*}\022\203\002\n" + + "\020FetchAccessToken\0229.google.cloud.develop" + + "erconnect.v1.FetchAccessTokenRequest\032:.g" + + "oogle.cloud.developerconnect.v1.FetchAcc" + + "essTokenResponse\"x\332A\021account_connector\202\323" + + "\344\223\002^\"Y/v1/{account_connector=projects/*/" + + "locations/*/accountConnectors/*}/users:f" + + "etchAccessToken:\001*\022\304\001\n\tListUsers\0222.googl" + + "e.cloud.developerconnect.v1.ListUsersReq" + + "uest\0323.google.cloud.developerconnect.v1." + + "ListUsersResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1/" + + "{parent=projects/*/locations/*/accountCo" + + "nnectors/*}/users\022\333\001\n\nDeleteUser\0223.googl" + + "e.cloud.developerconnect.v1.DeleteUserRe" + + "quest\032\035.google.longrunning.Operation\"y\312A" + + "*\n\025google.protobuf.Empty\022\021OperationMetad" + + "ata\332A\004name\202\323\344\223\002?*=/v1/{name=projects/*/l" + + "ocations/*/accountConnectors/*/users/*}\022" + + "\275\001\n\tFetchSelf\0222.google.cloud.developerco" + + "nnect.v1.FetchSelfRequest\032&.google.cloud" + + ".developerconnect.v1.User\"T\332A\004name\202\323\344\223\002G" + + "\022E/v1/{name=projects/*/locations/*/accou" + + "ntConnectors/*}/users:fetchSelf\022\345\001\n\nDele" + + "teSelf\0223.google.cloud.developerconnect.v" + + "1.DeleteSelfRequest\032\035.google.longrunning" + + ".Operation\"\202\001\312A*\n\025google.protobuf.Empty\022" + + "\021OperationMetadata\332A\004name\202\323\344\223\002H*F/v1/{na" + + "me=projects/*/locations/*/accountConnect" + + "ors/*}/users:deleteSelf\032S\312A\037developercon" + + "nect.googleapis.com\322A.https://www.google" + + "apis.com/auth/cloud-platformB\370\004\n$com.goo" + + "gle.cloud.developerconnect.v1B\025Developer" + + "ConnectProtoP\001ZPcloud.google.com/go/deve" + + "loperconnect/apiv1/developerconnectpb;de" + + "veloperconnectpb\242\002\020DeveloperConnect\252\002 Go" + + "ogle.Cloud.DeveloperConnect.V1\312\002 Google\\" + + "Cloud\\DeveloperConnect\\V1\352\002#Google::Clou" + + "d::DeveloperConnect::V1\352Ak\n*secretmanage" + + "r.googleapis.com/SecretVersion\022=projects" + + "/{project}/secrets/{secret}/versions/{se" + + "cret_version}\352Ax\n!cloudkms.googleapis.co" + + "m/CryptoKey\022Sprojects/{project}/location" + + "s/{location}/keyRings/{key_ring}/cryptoK" + + "eys/{crypto_key}\352A|\n\'servicedirectory.go" + + "ogleapis.com/Service\022Qprojects/{project}" + + "/locations/{location}/namespaces/{namesp" + + "ace}/services/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -553,8 +860,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); - internal_static_google_cloud_developerconnect_v1_Connection_descriptor = + internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_developerconnect_v1_ListUsersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_developerconnect_v1_ListUsersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor, + new java.lang.String[] { + "Users", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_developerconnect_v1_Connection_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_google_cloud_developerconnect_v1_Connection_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_Connection_descriptor, @@ -563,6 +886,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GithubEnterpriseConfig", "GitlabConfig", "GitlabEnterpriseConfig", + "BitbucketDataCenterConfig", + "BitbucketCloudConfig", "Name", "CreateTime", "UpdateTime", @@ -575,6 +900,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Etag", "Uid", "CryptoKeyConfig", + "GitProxyConfig", "ConnectionConfig", }); internal_static_google_cloud_developerconnect_v1_Connection_LabelsEntry_descriptor = @@ -598,15 +924,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_developerconnect_v1_CryptoKeyConfig_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(3); internal_static_google_cloud_developerconnect_v1_CryptoKeyConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_CryptoKeyConfig_descriptor, new java.lang.String[] { "KeyReference", }); + internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_developerconnect_v1_GitProxyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor, + new java.lang.String[] { + "Enabled", + }); internal_static_google_cloud_developerconnect_v1_InstallationState_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_developerconnect_v1_InstallationState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_InstallationState_descriptor, @@ -614,7 +948,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Stage", "Message", "ActionUri", }); internal_static_google_cloud_developerconnect_v1_GitHubConfig_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_developerconnect_v1_GitHubConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GitHubConfig_descriptor, @@ -622,7 +956,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GithubApp", "AuthorizerCredential", "AppInstallationId", "InstallationUri", }); internal_static_google_cloud_developerconnect_v1_GitHubEnterpriseConfig_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_developerconnect_v1_GitHubEnterpriseConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GitHubEnterpriseConfig_descriptor, @@ -639,7 +973,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SslCaCertificate", }); internal_static_google_cloud_developerconnect_v1_ServiceDirectoryConfig_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_developerconnect_v1_ServiceDirectoryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_ServiceDirectoryConfig_descriptor, @@ -647,7 +981,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Service", }); internal_static_google_cloud_developerconnect_v1_OAuthCredential_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_developerconnect_v1_OAuthCredential_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_OAuthCredential_descriptor, @@ -655,7 +989,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OauthTokenSecretVersion", "Username", }); internal_static_google_cloud_developerconnect_v1_GitLabConfig_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_developerconnect_v1_GitLabConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GitLabConfig_descriptor, @@ -663,7 +997,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WebhookSecretSecretVersion", "ReadAuthorizerCredential", "AuthorizerCredential", }); internal_static_google_cloud_developerconnect_v1_UserCredential_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_developerconnect_v1_UserCredential_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_UserCredential_descriptor, @@ -671,7 +1005,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserTokenSecretVersion", "Username", }); internal_static_google_cloud_developerconnect_v1_GitLabEnterpriseConfig_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_developerconnect_v1_GitLabEnterpriseConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GitLabEnterpriseConfig_descriptor, @@ -684,8 +1018,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SslCaCertificate", "ServerVersion", }); + internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_BitbucketDataCenterConfig_descriptor, + new java.lang.String[] { + "HostUri", + "WebhookSecretSecretVersion", + "ReadAuthorizerCredential", + "AuthorizerCredential", + "ServiceDirectoryConfig", + "SslCaCertificate", + "ServerVersion", + }); + internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_BitbucketCloudConfig_descriptor, + new java.lang.String[] { + "Workspace", + "WebhookSecretSecretVersion", + "ReadAuthorizerCredential", + "AuthorizerCredential", + }); internal_static_google_cloud_developerconnect_v1_ListConnectionsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_developerconnect_v1_ListConnectionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_ListConnectionsRequest_descriptor, @@ -693,7 +1052,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_developerconnect_v1_ListConnectionsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_developerconnect_v1_ListConnectionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_ListConnectionsResponse_descriptor, @@ -701,7 +1060,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Connections", "NextPageToken", "Unreachable", }); internal_static_google_cloud_developerconnect_v1_GetConnectionRequest_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_developerconnect_v1_GetConnectionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GetConnectionRequest_descriptor, @@ -709,7 +1068,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_developerconnect_v1_CreateConnectionRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_developerconnect_v1_CreateConnectionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_CreateConnectionRequest_descriptor, @@ -717,7 +1076,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ConnectionId", "Connection", "RequestId", "ValidateOnly", }); internal_static_google_cloud_developerconnect_v1_UpdateConnectionRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_developerconnect_v1_UpdateConnectionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_UpdateConnectionRequest_descriptor, @@ -725,15 +1084,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "Connection", "RequestId", "AllowMissing", "ValidateOnly", }); internal_static_google_cloud_developerconnect_v1_DeleteConnectionRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_developerconnect_v1_DeleteConnectionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_DeleteConnectionRequest_descriptor, new java.lang.String[] { "Name", "RequestId", "ValidateOnly", "Etag", }); + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor, + new java.lang.String[] { + "AccountConnectors", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_CreateAccountConnectorRequest_descriptor, + new java.lang.String[] { + "Parent", "AccountConnectorId", "AccountConnector", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "AccountConnector", "RequestId", "AllowMissing", "ValidateOnly", + }); + internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_DeleteAccountConnectorRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "ValidateOnly", "Etag", "Force", + }); + internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_DeleteUserRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "ValidateOnly", "Etag", + }); internal_static_google_cloud_developerconnect_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_developerconnect_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_OperationMetadata_descriptor, @@ -746,8 +1161,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestedCancellation", "ApiVersion", }); + internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_DeleteSelfRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor, + new java.lang.String[] { + "AccountConnector", + }); + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor, + new java.lang.String[] { + "Token", "ExpirationTime", "Scopes", "ExchangeError", + }); + internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_developerconnect_v1_ExchangeError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor, + new java.lang.String[] { + "Code", "Description", + }); internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_descriptor, @@ -763,6 +1218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Annotations", "Uid", "WebhookId", + "GitProxyUri", }); internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_LabelsEntry_descriptor = internal_static_google_cloud_developerconnect_v1_GitRepositoryLink_descriptor @@ -785,7 +1241,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_developerconnect_v1_CreateGitRepositoryLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_developerconnect_v1_CreateGitRepositoryLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_CreateGitRepositoryLinkRequest_descriptor, @@ -793,7 +1249,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "GitRepositoryLink", "GitRepositoryLinkId", "RequestId", "ValidateOnly", }); internal_static_google_cloud_developerconnect_v1_DeleteGitRepositoryLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_developerconnect_v1_DeleteGitRepositoryLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_DeleteGitRepositoryLinkRequest_descriptor, @@ -801,7 +1257,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "RequestId", "ValidateOnly", "Etag", }); internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksRequest_descriptor, @@ -809,7 +1265,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_ListGitRepositoryLinksResponse_descriptor, @@ -817,7 +1273,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitRepositoryLinks", "NextPageToken", "Unreachable", }); internal_static_google_cloud_developerconnect_v1_GetGitRepositoryLinkRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_developerconnect_v1_GetGitRepositoryLinkRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_GetGitRepositoryLinkRequest_descriptor, @@ -825,7 +1281,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenRequest_descriptor, @@ -833,7 +1289,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitRepositoryLink", }); internal_static_google_cloud_developerconnect_v1_FetchReadTokenRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_developerconnect_v1_FetchReadTokenRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchReadTokenRequest_descriptor, @@ -841,7 +1297,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitRepositoryLink", }); internal_static_google_cloud_developerconnect_v1_FetchReadTokenResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_developerconnect_v1_FetchReadTokenResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchReadTokenResponse_descriptor, @@ -849,7 +1305,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Token", "ExpirationTime", "GitUsername", }); internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchReadWriteTokenResponse_descriptor, @@ -857,7 +1313,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Token", "ExpirationTime", "GitUsername", }); internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesRequest_descriptor, @@ -865,7 +1321,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Connection", "PageSize", "PageToken", }); internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchLinkableGitRepositoriesResponse_descriptor, @@ -873,7 +1329,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LinkableGitRepositories", "NextPageToken", }); internal_static_google_cloud_developerconnect_v1_LinkableGitRepository_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_developerconnect_v1_LinkableGitRepository_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_LinkableGitRepository_descriptor, @@ -881,7 +1337,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CloneUri", }); internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsRequest_descriptor, @@ -889,7 +1345,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Connection", }); internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchGitHubInstallationsResponse_descriptor, @@ -907,7 +1363,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "Name", "Type", }); internal_static_google_cloud_developerconnect_v1_FetchGitRefsRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_developerconnect_v1_FetchGitRefsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchGitRefsRequest_descriptor, @@ -915,13 +1371,65 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GitRepositoryLink", "RefType", "PageSize", "PageToken", }); internal_static_google_cloud_developerconnect_v1_FetchGitRefsResponse_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_developerconnect_v1_FetchGitRefsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_developerconnect_v1_FetchGitRefsResponse_descriptor, new java.lang.String[] { "RefNames", "NextPageToken", }); + internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_cloud_developerconnect_v1_AccountConnector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor, + new java.lang.String[] { + "ProviderOauthConfig", + "Name", + "CreateTime", + "UpdateTime", + "Annotations", + "Etag", + "Labels", + "OauthStartUri", + "AccountConnectorConfig", + }); + internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_descriptor = + internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_AccountConnector_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_descriptor = + internal_static_google_cloud_developerconnect_v1_AccountConnector_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_AccountConnector_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_developerconnect_v1_User_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_cloud_developerconnect_v1_User_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_User_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "CreateTime", "LastTokenRequestTime", + }); + internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor, + new java.lang.String[] { + "SystemProviderId", "Scopes", "OauthProviderId", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeError.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeError.java new file mode 100644 index 000000000000..fb8958b24331 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeError.java @@ -0,0 +1,830 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for representing an error from exchanging OAuth tokens.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ExchangeError} + */ +public final class ExchangeError extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ExchangeError) + ExchangeErrorOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ExchangeError.newBuilder() to construct. + private ExchangeError(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExchangeError() { + code_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExchangeError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ExchangeError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ExchangeError.class, + com.google.cloud.developerconnect.v1.ExchangeError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+   * 
+ * + * string code = 1; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+   * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+   * error_description
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+   * error_description
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, 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(code_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, 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.developerconnect.v1.ExchangeError)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ExchangeError other = + (com.google.cloud.developerconnect.v1.ExchangeError) obj; + + if (!getCode().equals(other.getCode())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().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.developerconnect.v1.ExchangeError parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError 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.developerconnect.v1.ExchangeError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseFrom( + 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.developerconnect.v1.ExchangeError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseFrom( + java.io.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.developerconnect.v1.ExchangeError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseDelimitedFrom( + java.io.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.developerconnect.v1.ExchangeError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ExchangeError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for representing an error from exchanging OAuth tokens.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ExchangeError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ExchangeError) + com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ExchangeError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ExchangeError.class, + com.google.cloud.developerconnect.v1.ExchangeError.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ExchangeError.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ExchangeError_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ExchangeError getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ExchangeError build() { + com.google.cloud.developerconnect.v1.ExchangeError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ExchangeError buildPartial() { + com.google.cloud.developerconnect.v1.ExchangeError result = + new com.google.cloud.developerconnect.v1.ExchangeError(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.ExchangeError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 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.developerconnect.v1.ExchangeError) { + return mergeFrom((com.google.cloud.developerconnect.v1.ExchangeError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.ExchangeError other) { + if (other == com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance()) + return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = 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 code_ = ""; + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+     * 
+ * + * string code = 1; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+     * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+     * 
+ * + * string code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+     * 
+ * + * string code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+     * 
+ * + * string code = 1; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+     * error_description
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+     * error_description
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+     * error_description
+     * 
+ * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+     * error_description
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+     * error_description
+     * 
+ * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + 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.developerconnect.v1.ExchangeError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ExchangeError) + private static final com.google.cloud.developerconnect.v1.ExchangeError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ExchangeError(); + } + + public static com.google.cloud.developerconnect.v1.ExchangeError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExchangeError 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.developerconnect.v1.ExchangeError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeErrorOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeErrorOrBuilder.java new file mode 100644 index 000000000000..5b34a232799f --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ExchangeErrorOrBuilder.java @@ -0,0 +1,80 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ExchangeErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ExchangeError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+   * 
+ * + * string code = 1; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error
+   * 
+ * + * string code = 1; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+   * error_description
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 -
+   * error_description
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequest.java new file mode 100644 index 000000000000..39c8a27e72bb --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequest.java @@ -0,0 +1,660 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for fetching an OAuth access token.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchAccessTokenRequest} + */ +public final class FetchAccessTokenRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.FetchAccessTokenRequest) + FetchAccessTokenRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FetchAccessTokenRequest.newBuilder() to construct. + private FetchAccessTokenRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchAccessTokenRequest() { + accountConnector_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchAccessTokenRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.class, + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.Builder.class); + } + + public static final int ACCOUNT_CONNECTOR_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object accountConnector_ = ""; + + /** + * + * + *
+   * Required. The resource name of the AccountConnector in the format
+   * `projects/*/locations/*/accountConnectors/*`.
+   * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The accountConnector. + */ + @java.lang.Override + public java.lang.String getAccountConnector() { + java.lang.Object ref = accountConnector_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountConnector_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The resource name of the AccountConnector in the format
+   * `projects/*/locations/*/accountConnectors/*`.
+   * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for accountConnector. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountConnectorBytes() { + java.lang.Object ref = accountConnector_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountConnector_ = 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(accountConnector_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accountConnector_); + } + 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(accountConnector_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accountConnector_); + } + 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.developerconnect.v1.FetchAccessTokenRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest other = + (com.google.cloud.developerconnect.v1.FetchAccessTokenRequest) obj; + + if (!getAccountConnector().equals(other.getAccountConnector())) 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) + ACCOUNT_CONNECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAccountConnector().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest 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.developerconnect.v1.FetchAccessTokenRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + 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.developerconnect.v1.FetchAccessTokenRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + java.io.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.developerconnect.v1.FetchAccessTokenRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.FetchAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.FetchAccessTokenRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for fetching an OAuth access token.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchAccessTokenRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.FetchAccessTokenRequest) + com.google.cloud.developerconnect.v1.FetchAccessTokenRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.class, + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + accountConnector_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenRequest build() { + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenRequest buildPartial() { + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest result = + new com.google.cloud.developerconnect.v1.FetchAccessTokenRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.FetchAccessTokenRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.accountConnector_ = accountConnector_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.FetchAccessTokenRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.FetchAccessTokenRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.FetchAccessTokenRequest other) { + if (other + == com.google.cloud.developerconnect.v1.FetchAccessTokenRequest.getDefaultInstance()) + return this; + if (!other.getAccountConnector().isEmpty()) { + accountConnector_ = other.accountConnector_; + 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: + { + accountConnector_ = 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 accountConnector_ = ""; + + /** + * + * + *
+     * Required. The resource name of the AccountConnector in the format
+     * `projects/*/locations/*/accountConnectors/*`.
+     * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The accountConnector. + */ + public java.lang.String getAccountConnector() { + java.lang.Object ref = accountConnector_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountConnector_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the AccountConnector in the format
+     * `projects/*/locations/*/accountConnectors/*`.
+     * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for accountConnector. + */ + public com.google.protobuf.ByteString getAccountConnectorBytes() { + java.lang.Object ref = accountConnector_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountConnector_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The resource name of the AccountConnector in the format
+     * `projects/*/locations/*/accountConnectors/*`.
+     * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The accountConnector to set. + * @return This builder for chaining. + */ + public Builder setAccountConnector(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accountConnector_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the AccountConnector in the format
+     * `projects/*/locations/*/accountConnectors/*`.
+     * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAccountConnector() { + accountConnector_ = getDefaultInstance().getAccountConnector(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource name of the AccountConnector in the format
+     * `projects/*/locations/*/accountConnectors/*`.
+     * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for accountConnector to set. + * @return This builder for chaining. + */ + public Builder setAccountConnectorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accountConnector_ = 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.developerconnect.v1.FetchAccessTokenRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.FetchAccessTokenRequest) + private static final com.google.cloud.developerconnect.v1.FetchAccessTokenRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.FetchAccessTokenRequest(); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchAccessTokenRequest 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.developerconnect.v1.FetchAccessTokenRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequestOrBuilder.java new file mode 100644 index 000000000000..30ee167c2e86 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenRequestOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface FetchAccessTokenRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.FetchAccessTokenRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the AccountConnector in the format
+   * `projects/*/locations/*/accountConnectors/*`.
+   * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The accountConnector. + */ + java.lang.String getAccountConnector(); + + /** + * + * + *
+   * Required. The resource name of the AccountConnector in the format
+   * `projects/*/locations/*/accountConnectors/*`.
+   * 
+ * + * + * string account_connector = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for accountConnector. + */ + com.google.protobuf.ByteString getAccountConnectorBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponse.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponse.java new file mode 100644 index 000000000000..8bd38de11652 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponse.java @@ -0,0 +1,1504 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for responding to getting an OAuth access token.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchAccessTokenResponse} + */ +public final class FetchAccessTokenResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.FetchAccessTokenResponse) + FetchAccessTokenResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FetchAccessTokenResponse.newBuilder() to construct. + private FetchAccessTokenResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchAccessTokenResponse() { + token_ = ""; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchAccessTokenResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.class, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.Builder.class); + } + + private int bitField0_; + public static final int TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + + /** + * + * + *
+   * The token content.
+   * 
+ * + * string token = 1; + * + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + + /** + * + * + *
+   * The token content.
+   * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp expirationTime_; + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + @java.lang.Override + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpirationTime() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + + public static final int SCOPES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + public static final int EXCHANGE_ERROR_FIELD_NUMBER = 4; + private com.google.cloud.developerconnect.v1.ExchangeError exchangeError_; + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return Whether the exchangeError field is set. + */ + @java.lang.Override + public boolean hasExchangeError() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return The exchangeError. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ExchangeError getExchangeError() { + return exchangeError_ == null + ? com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance() + : exchangeError_; + } + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder getExchangeErrorOrBuilder() { + return exchangeError_ == null + ? com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance() + : exchangeError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExpirationTime()); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, scopes_.getRaw(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getExchangeError()); + } + 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(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExpirationTime()); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().size(); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExchangeError()); + } + 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.developerconnect.v1.FetchAccessTokenResponse)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse other = + (com.google.cloud.developerconnect.v1.FetchAccessTokenResponse) obj; + + if (!getToken().equals(other.getToken())) return false; + if (hasExpirationTime() != other.hasExpirationTime()) return false; + if (hasExpirationTime()) { + if (!getExpirationTime().equals(other.getExpirationTime())) return false; + } + if (!getScopesList().equals(other.getScopesList())) return false; + if (hasExchangeError() != other.hasExchangeError()) return false; + if (hasExchangeError()) { + if (!getExchangeError().equals(other.getExchangeError())) 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) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + if (hasExpirationTime()) { + hash = (37 * hash) + EXPIRATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpirationTime().hashCode(); + } + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + if (hasExchangeError()) { + hash = (37 * hash) + EXCHANGE_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getExchangeError().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse 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.developerconnect.v1.FetchAccessTokenResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + 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.developerconnect.v1.FetchAccessTokenResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + java.io.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.developerconnect.v1.FetchAccessTokenResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseDelimitedFrom( + java.io.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.developerconnect.v1.FetchAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.FetchAccessTokenResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for responding to getting an OAuth access token.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchAccessTokenResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.FetchAccessTokenResponse) + com.google.cloud.developerconnect.v1.FetchAccessTokenResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.class, + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpirationTimeFieldBuilder(); + getExchangeErrorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + exchangeError_ = null; + if (exchangeErrorBuilder_ != null) { + exchangeErrorBuilder_.dispose(); + exchangeErrorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchAccessTokenResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenResponse + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenResponse build() { + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchAccessTokenResponse buildPartial() { + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse result = + new com.google.cloud.developerconnect.v1.FetchAccessTokenResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.FetchAccessTokenResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.expirationTime_ = + expirationTimeBuilder_ == null ? expirationTime_ : expirationTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.exchangeError_ = + exchangeErrorBuilder_ == null ? exchangeError_ : exchangeErrorBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + 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.developerconnect.v1.FetchAccessTokenResponse) { + return mergeFrom((com.google.cloud.developerconnect.v1.FetchAccessTokenResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.FetchAccessTokenResponse other) { + if (other + == com.google.cloud.developerconnect.v1.FetchAccessTokenResponse.getDefaultInstance()) + return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasExpirationTime()) { + mergeExpirationTime(other.getExpirationTime()); + } + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000004; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + onChanged(); + } + if (other.hasExchangeError()) { + mergeExchangeError(other.getExchangeError()); + } + 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: + { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getExpirationTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getExchangeErrorFieldBuilder().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 java.lang.Object token_ = ""; + + /** + * + * + *
+     * The token content.
+     * 
+ * + * string token = 1; + * + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The token content.
+     * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + public com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The token content.
+     * 
+ * + * string token = 1; + * + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The token content.
+     * 
+ * + * string token = 1; + * + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * The token content.
+     * 
+ * + * string token = 1; + * + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expirationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expirationTimeBuilder_; + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + public com.google.protobuf.Timestamp getExpirationTime() { + if (expirationTimeBuilder_ == null) { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } else { + return expirationTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expirationTime_ = value; + } else { + expirationTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder setExpirationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expirationTimeBuilder_ == null) { + expirationTime_ = builderForValue.build(); + } else { + expirationTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder mergeExpirationTime(com.google.protobuf.Timestamp value) { + if (expirationTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && expirationTime_ != null + && expirationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpirationTimeBuilder().mergeFrom(value); + } else { + expirationTime_ = value; + } + } else { + expirationTimeBuilder_.mergeFrom(value); + } + if (expirationTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000002); + expirationTime_ = null; + if (expirationTimeBuilder_ != null) { + expirationTimeBuilder_.dispose(); + expirationTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExpirationTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder() { + if (expirationTimeBuilder_ != null) { + return expirationTimeBuilder_.getMessageOrBuilder(); + } else { + return expirationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expirationTime_; + } + } + + /** + * + * + *
+     * Expiration timestamp. Can be empty if unknown or non-expiring.
+     * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpirationTimeFieldBuilder() { + if (expirationTimeBuilder_ == null) { + expirationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpirationTime(), getParentForChildren(), isClean()); + expirationTime_ = null; + } + return expirationTimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * The scopes of the access token.
+     * 
+ * + * repeated string scopes = 3; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.developerconnect.v1.ExchangeError exchangeError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ExchangeError, + com.google.cloud.developerconnect.v1.ExchangeError.Builder, + com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder> + exchangeErrorBuilder_; + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return Whether the exchangeError field is set. + */ + public boolean hasExchangeError() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return The exchangeError. + */ + public com.google.cloud.developerconnect.v1.ExchangeError getExchangeError() { + if (exchangeErrorBuilder_ == null) { + return exchangeError_ == null + ? com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance() + : exchangeError_; + } else { + return exchangeErrorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public Builder setExchangeError(com.google.cloud.developerconnect.v1.ExchangeError value) { + if (exchangeErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exchangeError_ = value; + } else { + exchangeErrorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public Builder setExchangeError( + com.google.cloud.developerconnect.v1.ExchangeError.Builder builderForValue) { + if (exchangeErrorBuilder_ == null) { + exchangeError_ = builderForValue.build(); + } else { + exchangeErrorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public Builder mergeExchangeError(com.google.cloud.developerconnect.v1.ExchangeError value) { + if (exchangeErrorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && exchangeError_ != null + && exchangeError_ + != com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance()) { + getExchangeErrorBuilder().mergeFrom(value); + } else { + exchangeError_ = value; + } + } else { + exchangeErrorBuilder_.mergeFrom(value); + } + if (exchangeError_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public Builder clearExchangeError() { + bitField0_ = (bitField0_ & ~0x00000008); + exchangeError_ = null; + if (exchangeErrorBuilder_ != null) { + exchangeErrorBuilder_.dispose(); + exchangeErrorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public com.google.cloud.developerconnect.v1.ExchangeError.Builder getExchangeErrorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getExchangeErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + public com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder getExchangeErrorOrBuilder() { + if (exchangeErrorBuilder_ != null) { + return exchangeErrorBuilder_.getMessageOrBuilder(); + } else { + return exchangeError_ == null + ? com.google.cloud.developerconnect.v1.ExchangeError.getDefaultInstance() + : exchangeError_; + } + } + + /** + * + * + *
+     * The error resulted from exchanging OAuth tokens from the service provider.
+     * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ExchangeError, + com.google.cloud.developerconnect.v1.ExchangeError.Builder, + com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder> + getExchangeErrorFieldBuilder() { + if (exchangeErrorBuilder_ == null) { + exchangeErrorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.ExchangeError, + com.google.cloud.developerconnect.v1.ExchangeError.Builder, + com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder>( + getExchangeError(), getParentForChildren(), isClean()); + exchangeError_ = null; + } + return exchangeErrorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.FetchAccessTokenResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.FetchAccessTokenResponse) + private static final com.google.cloud.developerconnect.v1.FetchAccessTokenResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.FetchAccessTokenResponse(); + } + + public static com.google.cloud.developerconnect.v1.FetchAccessTokenResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchAccessTokenResponse 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.developerconnect.v1.FetchAccessTokenResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponseOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponseOrBuilder.java new file mode 100644 index 000000000000..1077f7ff1524 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchAccessTokenResponseOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface FetchAccessTokenResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.FetchAccessTokenResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The token content.
+   * 
+ * + * string token = 1; + * + * @return The token. + */ + java.lang.String getToken(); + + /** + * + * + *
+   * The token content.
+   * 
+ * + * string token = 1; + * + * @return The bytes for token. + */ + com.google.protobuf.ByteString getTokenBytes(); + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return Whether the expirationTime field is set. + */ + boolean hasExpirationTime(); + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + * + * @return The expirationTime. + */ + com.google.protobuf.Timestamp getExpirationTime(); + + /** + * + * + *
+   * Expiration timestamp. Can be empty if unknown or non-expiring.
+   * 
+ * + * .google.protobuf.Timestamp expiration_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder(); + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+   * The scopes of the access token.
+   * 
+ * + * repeated string scopes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return Whether the exchangeError field is set. + */ + boolean hasExchangeError(); + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + * + * @return The exchangeError. + */ + com.google.cloud.developerconnect.v1.ExchangeError getExchangeError(); + + /** + * + * + *
+   * The error resulted from exchanging OAuth tokens from the service provider.
+   * 
+ * + * .google.cloud.developerconnect.v1.ExchangeError exchange_error = 4; + */ + com.google.cloud.developerconnect.v1.ExchangeErrorOrBuilder getExchangeErrorOrBuilder(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequest.java new file mode 100644 index 000000000000..9d080c96deeb --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequest.java @@ -0,0 +1,649 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for fetching a User of the user themselves.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchSelfRequest} + */ +public final class FetchSelfRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.FetchSelfRequest) + FetchSelfRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use FetchSelfRequest.newBuilder() to construct. + private FetchSelfRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchSelfRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchSelfRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchSelfRequest.class, + com.google.cloud.developerconnect.v1.FetchSelfRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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.developerconnect.v1.FetchSelfRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.FetchSelfRequest other = + (com.google.cloud.developerconnect.v1.FetchSelfRequest) 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.developerconnect.v1.FetchSelfRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest 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.developerconnect.v1.FetchSelfRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseFrom( + 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.developerconnect.v1.FetchSelfRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseFrom( + java.io.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.developerconnect.v1.FetchSelfRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.FetchSelfRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.FetchSelfRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for fetching a User of the user themselves.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.FetchSelfRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.FetchSelfRequest) + com.google.cloud.developerconnect.v1.FetchSelfRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.FetchSelfRequest.class, + com.google.cloud.developerconnect.v1.FetchSelfRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.FetchSelfRequest.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.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_FetchSelfRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchSelfRequest getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.FetchSelfRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchSelfRequest build() { + com.google.cloud.developerconnect.v1.FetchSelfRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.FetchSelfRequest buildPartial() { + com.google.cloud.developerconnect.v1.FetchSelfRequest result = + new com.google.cloud.developerconnect.v1.FetchSelfRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.FetchSelfRequest 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.developerconnect.v1.FetchSelfRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.FetchSelfRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.FetchSelfRequest other) { + if (other == com.google.cloud.developerconnect.v1.FetchSelfRequest.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. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the AccountConnector resource
+     * 
+ * + * + * 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. Name of the AccountConnector resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + 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.developerconnect.v1.FetchSelfRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.FetchSelfRequest) + private static final com.google.cloud.developerconnect.v1.FetchSelfRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.FetchSelfRequest(); + } + + public static com.google.cloud.developerconnect.v1.FetchSelfRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchSelfRequest 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.developerconnect.v1.FetchSelfRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequestOrBuilder.java new file mode 100644 index 000000000000..0260af09a425 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/FetchSelfRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface FetchSelfRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.FetchSelfRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the AccountConnector resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkload.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkload.java new file mode 100644 index 000000000000..25f8be6e107d --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkload.java @@ -0,0 +1,865 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * GKEWorkload represents the Google Kubernetes Engine runtime.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GKEWorkload} + */ +public final class GKEWorkload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GKEWorkload) + GKEWorkloadOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GKEWorkload.newBuilder() to construct. + private GKEWorkload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GKEWorkload() { + cluster_ = ""; + deployment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GKEWorkload(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GKEWorkload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GKEWorkload.class, + com.google.cloud.developerconnect.v1.GKEWorkload.Builder.class); + } + + public static final int CLUSTER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object cluster_ = ""; + + /** + * + * + *
+   * Required. Immutable. The name of the GKE cluster.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}`.
+   * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The cluster. + */ + @java.lang.Override + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The name of the GKE cluster.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}`.
+   * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for cluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOYMENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object deployment_ = ""; + + /** + * + * + *
+   * Output only. The name of the GKE deployment.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+   * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deployment. + */ + @java.lang.Override + public java.lang.String getDeployment() { + java.lang.Object ref = deployment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployment_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The name of the GKE deployment.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+   * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deployment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDeploymentBytes() { + java.lang.Object ref = deployment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployment_ = 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(cluster_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deployment_); + } + 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(cluster_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cluster_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deployment_); + } + 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.developerconnect.v1.GKEWorkload)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GKEWorkload other = + (com.google.cloud.developerconnect.v1.GKEWorkload) obj; + + if (!getCluster().equals(other.getCluster())) return false; + if (!getDeployment().equals(other.getDeployment())) 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) + CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getCluster().hashCode(); + hash = (37 * hash) + DEPLOYMENT_FIELD_NUMBER; + hash = (53 * hash) + getDeployment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload 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.developerconnect.v1.GKEWorkload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom( + 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.developerconnect.v1.GKEWorkload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom( + java.io.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.developerconnect.v1.GKEWorkload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseDelimitedFrom( + java.io.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.developerconnect.v1.GKEWorkload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GKEWorkload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * GKEWorkload represents the Google Kubernetes Engine runtime.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GKEWorkload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GKEWorkload) + com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GKEWorkload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GKEWorkload.class, + com.google.cloud.developerconnect.v1.GKEWorkload.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GKEWorkload.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cluster_ = ""; + deployment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkload getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkload build() { + com.google.cloud.developerconnect.v1.GKEWorkload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkload buildPartial() { + com.google.cloud.developerconnect.v1.GKEWorkload result = + new com.google.cloud.developerconnect.v1.GKEWorkload(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.GKEWorkload result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cluster_ = cluster_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deployment_ = deployment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.GKEWorkload) { + return mergeFrom((com.google.cloud.developerconnect.v1.GKEWorkload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.GKEWorkload other) { + if (other == com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance()) + return this; + if (!other.getCluster().isEmpty()) { + cluster_ = other.cluster_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDeployment().isEmpty()) { + deployment_ = other.deployment_; + 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: + { + cluster_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + deployment_ = 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 cluster_ = ""; + + /** + * + * + *
+     * Required. Immutable. The name of the GKE cluster.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}`.
+     * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The cluster. + */ + public java.lang.String getCluster() { + java.lang.Object ref = cluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The name of the GKE cluster.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}`.
+     * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for cluster. + */ + public com.google.protobuf.ByteString getClusterBytes() { + java.lang.Object ref = cluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The name of the GKE cluster.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}`.
+     * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The cluster to set. + * @return This builder for chaining. + */ + public Builder setCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The name of the GKE cluster.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}`.
+     * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearCluster() { + cluster_ = getDefaultInstance().getCluster(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The name of the GKE cluster.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}`.
+     * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for cluster to set. + * @return This builder for chaining. + */ + public Builder setClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cluster_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object deployment_ = ""; + + /** + * + * + *
+     * Output only. The name of the GKE deployment.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+     * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deployment. + */ + public java.lang.String getDeployment() { + java.lang.Object ref = deployment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deployment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the GKE deployment.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+     * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deployment. + */ + public com.google.protobuf.ByteString getDeploymentBytes() { + java.lang.Object ref = deployment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + deployment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The name of the GKE deployment.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+     * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The deployment to set. + * @return This builder for chaining. + */ + public Builder setDeployment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + deployment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the GKE deployment.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+     * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDeployment() { + deployment_ = getDefaultInstance().getDeployment(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The name of the GKE deployment.
+     * Format:
+     * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+     * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for deployment to set. + * @return This builder for chaining. + */ + public Builder setDeploymentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + deployment_ = 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.developerconnect.v1.GKEWorkload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GKEWorkload) + private static final com.google.cloud.developerconnect.v1.GKEWorkload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GKEWorkload(); + } + + public static com.google.cloud.developerconnect.v1.GKEWorkload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GKEWorkload 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.developerconnect.v1.GKEWorkload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkloadOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkloadOrBuilder.java new file mode 100644 index 000000000000..f95698bfc852 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GKEWorkloadOrBuilder.java @@ -0,0 +1,90 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GKEWorkloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GKEWorkload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Immutable. The name of the GKE cluster.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}`.
+   * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The cluster. + */ + java.lang.String getCluster(); + + /** + * + * + *
+   * Required. Immutable. The name of the GKE cluster.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}`.
+   * 
+ * + * + * string cluster = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for cluster. + */ + com.google.protobuf.ByteString getClusterBytes(); + + /** + * + * + *
+   * Output only. The name of the GKE deployment.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+   * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The deployment. + */ + java.lang.String getDeployment(); + + /** + * + * + *
+   * Output only. The name of the GKE deployment.
+   * Format:
+   * `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`.
+   * 
+ * + * string deployment = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for deployment. + */ + com.google.protobuf.ByteString getDeploymentBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequest.java new file mode 100644 index 000000000000..14afe9d1465d --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequest.java @@ -0,0 +1,656 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for getting a AccountConnector
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GetAccountConnectorRequest} + */ +public final class GetAccountConnectorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GetAccountConnectorRequest) + GetAccountConnectorRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetAccountConnectorRequest.newBuilder() to construct. + private GetAccountConnectorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAccountConnectorRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAccountConnectorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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.developerconnect.v1.GetAccountConnectorRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest other = + (com.google.cloud.developerconnect.v1.GetAccountConnectorRequest) 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.developerconnect.v1.GetAccountConnectorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest 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.developerconnect.v1.GetAccountConnectorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseFrom( + 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.developerconnect.v1.GetAccountConnectorRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseFrom( + java.io.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.developerconnect.v1.GetAccountConnectorRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.GetAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GetAccountConnectorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a AccountConnector
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GetAccountConnectorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GetAccountConnectorRequest) + com.google.cloud.developerconnect.v1.GetAccountConnectorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.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.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GetAccountConnectorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetAccountConnectorRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetAccountConnectorRequest build() { + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetAccountConnectorRequest buildPartial() { + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest result = + new com.google.cloud.developerconnect.v1.GetAccountConnectorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest 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.developerconnect.v1.GetAccountConnectorRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.GetAccountConnectorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.GetAccountConnectorRequest other) { + if (other + == com.google.cloud.developerconnect.v1.GetAccountConnectorRequest.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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource
+     * 
+ * + * + * 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. Name of the resource
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + 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.developerconnect.v1.GetAccountConnectorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GetAccountConnectorRequest) + private static final com.google.cloud.developerconnect.v1.GetAccountConnectorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GetAccountConnectorRequest(); + } + + public static com.google.cloud.developerconnect.v1.GetAccountConnectorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAccountConnectorRequest 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.developerconnect.v1.GetAccountConnectorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequestOrBuilder.java new file mode 100644 index 000000000000..b33aa2abbb56 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetAccountConnectorRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GetAccountConnectorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GetAccountConnectorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequest.java new file mode 100644 index 000000000000..fc8d877bb790 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequest.java @@ -0,0 +1,653 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Request for getting an InsightsConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GetInsightsConfigRequest} + */ +public final class GetInsightsConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GetInsightsConfigRequest) + GetInsightsConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetInsightsConfigRequest.newBuilder() to construct. + private GetInsightsConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInsightsConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetInsightsConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + 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.developerconnect.v1.GetInsightsConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest other = + (com.google.cloud.developerconnect.v1.GetInsightsConfigRequest) 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.developerconnect.v1.GetInsightsConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest 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.developerconnect.v1.GetInsightsConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseFrom( + 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.developerconnect.v1.GetInsightsConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseFrom( + java.io.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.developerconnect.v1.GetInsightsConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.GetInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GetInsightsConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for getting an InsightsConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GetInsightsConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GetInsightsConfigRequest) + com.google.cloud.developerconnect.v1.GetInsightsConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.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.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetInsightsConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetInsightsConfigRequest build() { + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GetInsightsConfigRequest buildPartial() { + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest result = + new com.google.cloud.developerconnect.v1.GetInsightsConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.GetInsightsConfigRequest 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.developerconnect.v1.GetInsightsConfigRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.GetInsightsConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.GetInsightsConfigRequest other) { + if (other + == com.google.cloud.developerconnect.v1.GetInsightsConfigRequest.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. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Name of the resource.
+     * 
+ * + * + * 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. Name of the resource.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + 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.developerconnect.v1.GetInsightsConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GetInsightsConfigRequest) + private static final com.google.cloud.developerconnect.v1.GetInsightsConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GetInsightsConfigRequest(); + } + + public static com.google.cloud.developerconnect.v1.GetInsightsConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInsightsConfigRequest 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.developerconnect.v1.GetInsightsConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequestOrBuilder.java new file mode 100644 index 000000000000..c7b2813141af --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GetInsightsConfigRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GetInsightsConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GetInsightsConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Name of the resource.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfig.java new file mode 100644 index 000000000000..426a12ca26f0 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfig.java @@ -0,0 +1,545 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * The git proxy configuration.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GitProxyConfig} + */ +public final class GitProxyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GitProxyConfig) + GitProxyConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GitProxyConfig.newBuilder() to construct. + private GitProxyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GitProxyConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GitProxyConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GitProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GitProxyConfig.class, + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + + /** + * + * + *
+   * Optional. Setting this to true allows the git proxy to be used for
+   * performing git operations on the repositories linked in the connection.
+   * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enabled_ != false) { + output.writeBool(1, enabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enabled_); + } + 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.developerconnect.v1.GitProxyConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GitProxyConfig other = + (com.google.cloud.developerconnect.v1.GitProxyConfig) obj; + + if (getEnabled() != other.getEnabled()) 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) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig 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.developerconnect.v1.GitProxyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + 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.developerconnect.v1.GitProxyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + java.io.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.developerconnect.v1.GitProxyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.GitProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GitProxyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 git proxy configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GitProxyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GitProxyConfig) + com.google.cloud.developerconnect.v1.GitProxyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GitProxyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GitProxyConfig.class, + com.google.cloud.developerconnect.v1.GitProxyConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GitProxyConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_GitProxyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GitProxyConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GitProxyConfig build() { + com.google.cloud.developerconnect.v1.GitProxyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GitProxyConfig buildPartial() { + com.google.cloud.developerconnect.v1.GitProxyConfig result = + new com.google.cloud.developerconnect.v1.GitProxyConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.GitProxyConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.GitProxyConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.GitProxyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.GitProxyConfig other) { + if (other == com.google.cloud.developerconnect.v1.GitProxyConfig.getDefaultInstance()) + return this; + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + 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: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enabled_; + + /** + * + * + *
+     * Optional. Setting this to true allows the git proxy to be used for
+     * performing git operations on the repositories linked in the connection.
+     * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + /** + * + * + *
+     * Optional. Setting this to true allows the git proxy to be used for
+     * performing git operations on the repositories linked in the connection.
+     * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Setting this to true allows the git proxy to be used for
+     * performing git operations on the repositories linked in the connection.
+     * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + enabled_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.GitProxyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GitProxyConfig) + private static final com.google.cloud.developerconnect.v1.GitProxyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GitProxyConfig(); + } + + public static com.google.cloud.developerconnect.v1.GitProxyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GitProxyConfig 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.developerconnect.v1.GitProxyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfigOrBuilder.java new file mode 100644 index 000000000000..b4cdb6184af6 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitProxyConfigOrBuilder.java @@ -0,0 +1,40 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GitProxyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GitProxyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Setting this to true allows the git proxy to be used for
+   * performing git operations on the repositories linked in the connection.
+   * 
+ * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + boolean getEnabled(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLink.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLink.java index 9a4b3c8f9a46..5c3111acaeeb 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLink.java +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLink.java @@ -45,6 +45,7 @@ private GitRepositoryLink() { etag_ = ""; uid_ = ""; webhookId_ = ""; + gitProxyUri_ = ""; } @java.lang.Override @@ -652,8 +653,7 @@ public java.lang.String getAnnotationsOrThrow(java.lang.String key) { * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the GitRepositoryLink.
    * 
* * @@ -679,8 +679,7 @@ public java.lang.String getUid() { * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the GitRepositoryLink.
    * 
* * @@ -755,6 +754,63 @@ public com.google.protobuf.ByteString getWebhookIdBytes() { } } + public static final int GIT_PROXY_URI_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object gitProxyUri_ = ""; + + /** + * + * + *
+   * Output only. URI to access the linked repository through the Git Proxy.
+   * This field is only populated if the git proxy is enabled for the
+   * connection.
+   * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gitProxyUri. + */ + @java.lang.Override + public java.lang.String getGitProxyUri() { + java.lang.Object ref = gitProxyUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gitProxyUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. URI to access the linked repository through the Git Proxy.
+   * This field is only populated if the git proxy is enabled for the
+   * connection.
+   * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gitProxyUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGitProxyUriBytes() { + java.lang.Object ref = gitProxyUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gitProxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -800,6 +856,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, webhookId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitProxyUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, gitProxyUri_); + } getUnknownFields().writeTo(output); } @@ -856,6 +915,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webhookId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, webhookId_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitProxyUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, gitProxyUri_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -892,6 +954,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; if (!getUid().equals(other.getUid())) return false; if (!getWebhookId().equals(other.getWebhookId())) return false; + if (!getGitProxyUri().equals(other.getGitProxyUri())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -935,6 +998,8 @@ public int hashCode() { hash = (53 * hash) + getUid().hashCode(); hash = (37 * hash) + WEBHOOK_ID_FIELD_NUMBER; hash = (53 * hash) + getWebhookId().hashCode(); + hash = (37 * hash) + GIT_PROXY_URI_FIELD_NUMBER; + hash = (53 * hash) + getGitProxyUri().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1136,6 +1201,7 @@ public Builder clear() { internalGetMutableAnnotations().clear(); uid_ = ""; webhookId_ = ""; + gitProxyUri_ = ""; return this; } @@ -1211,6 +1277,9 @@ private void buildPartial0(com.google.cloud.developerconnect.v1.GitRepositoryLin if (((from_bitField0_ & 0x00000400) != 0)) { result.webhookId_ = webhookId_; } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.gitProxyUri_ = gitProxyUri_; + } result.bitField0_ |= to_bitField0_; } @@ -1301,6 +1370,11 @@ public Builder mergeFrom(com.google.cloud.developerconnect.v1.GitRepositoryLink bitField0_ |= 0x00000400; onChanged(); } + if (!other.getGitProxyUri().isEmpty()) { + gitProxyUri_ = other.gitProxyUri_; + bitField0_ |= 0x00000800; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1405,6 +1479,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000400; break; } // case 90 + case 98: + { + gitProxyUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2827,8 +2907,7 @@ public Builder putAllAnnotations(java.util.Map - * Output only. A system-assigned unique identifier for a the - * GitRepositoryLink. + * Output only. A system-assigned unique identifier for the GitRepositoryLink. * * * @@ -2853,8 +2932,7 @@ public java.lang.String getUid() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the GitRepositoryLink.
      * 
* * @@ -2879,8 +2957,7 @@ public com.google.protobuf.ByteString getUidBytes() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the GitRepositoryLink.
      * 
* * @@ -2904,8 +2981,7 @@ public Builder setUid(java.lang.String value) { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the GitRepositoryLink.
      * 
* * @@ -2925,8 +3001,7 @@ public Builder clearUid() { * * *
-     * Output only. A system-assigned unique identifier for a the
-     * GitRepositoryLink.
+     * Output only. A system-assigned unique identifier for the GitRepositoryLink.
      * 
* * @@ -3058,6 +3133,127 @@ public Builder setWebhookIdBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object gitProxyUri_ = ""; + + /** + * + * + *
+     * Output only. URI to access the linked repository through the Git Proxy.
+     * This field is only populated if the git proxy is enabled for the
+     * connection.
+     * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gitProxyUri. + */ + public java.lang.String getGitProxyUri() { + java.lang.Object ref = gitProxyUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gitProxyUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. URI to access the linked repository through the Git Proxy.
+     * This field is only populated if the git proxy is enabled for the
+     * connection.
+     * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gitProxyUri. + */ + public com.google.protobuf.ByteString getGitProxyUriBytes() { + java.lang.Object ref = gitProxyUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gitProxyUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. URI to access the linked repository through the Git Proxy.
+     * This field is only populated if the git proxy is enabled for the
+     * connection.
+     * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gitProxyUri to set. + * @return This builder for chaining. + */ + public Builder setGitProxyUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + gitProxyUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. URI to access the linked repository through the Git Proxy.
+     * This field is only populated if the git proxy is enabled for the
+     * connection.
+     * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGitProxyUri() { + gitProxyUri_ = getDefaultInstance().getGitProxyUri(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. URI to access the linked repository through the Git Proxy.
+     * This field is only populated if the git proxy is enabled for the
+     * connection.
+     * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gitProxyUri to set. + * @return This builder for chaining. + */ + public Builder setGitProxyUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + gitProxyUri_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLinkOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLinkOrBuilder.java index f69b8b263c54..d073aea4d9ef 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLinkOrBuilder.java +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GitRepositoryLinkOrBuilder.java @@ -377,8 +377,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the GitRepositoryLink.
    * 
* * @@ -393,8 +392,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. A system-assigned unique identifier for a the
-   * GitRepositoryLink.
+   * Output only. A system-assigned unique identifier for the GitRepositoryLink.
    * 
* * @@ -430,4 +428,34 @@ java.lang.String getAnnotationsOrDefault( * @return The bytes for webhookId. */ com.google.protobuf.ByteString getWebhookIdBytes(); + + /** + * + * + *
+   * Output only. URI to access the linked repository through the Git Proxy.
+   * This field is only populated if the git proxy is enabled for the
+   * connection.
+   * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gitProxyUri. + */ + java.lang.String getGitProxyUri(); + + /** + * + * + *
+   * Output only. URI to access the linked repository through the Git Proxy.
+   * This field is only populated if the git proxy is enabled for the
+   * connection.
+   * 
+ * + * string git_proxy_uri = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gitProxyUri. + */ + com.google.protobuf.ByteString getGitProxyUriBytes(); } diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysis.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysis.java new file mode 100644 index 000000000000..8a3f0f4f8fdd --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysis.java @@ -0,0 +1,635 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Google Artifact Analysis configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GoogleArtifactAnalysis} + */ +public final class GoogleArtifactAnalysis extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + GoogleArtifactAnalysisOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GoogleArtifactAnalysis.newBuilder() to construct. + private GoogleArtifactAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleArtifactAnalysis() { + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleArtifactAnalysis(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.class, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * Required. The project id of the project where the provenance is stored.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The project id of the project where the provenance is stored.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis other = + (com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis 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.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + 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.developerconnect.v1.GoogleArtifactAnalysis parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + java.io.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.developerconnect.v1.GoogleArtifactAnalysis parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseDelimitedFrom( + java.io.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.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GoogleArtifactAnalysis prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Google Artifact Analysis configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GoogleArtifactAnalysis} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.class, + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis build() { + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis buildPartial() { + com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis result = + new com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.GoogleArtifactAnalysis) { + return mergeFrom((com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis other) { + if (other == com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + 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: + { + projectId_ = 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 projectId_ = ""; + + /** + * + * + *
+     * Required. The project id of the project where the provenance is stored.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The project id of the project where the provenance is stored.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The project id of the project where the provenance is stored.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project id of the project where the provenance is stored.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The project id of the project where the provenance is stored.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + 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.developerconnect.v1.GoogleArtifactAnalysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + private static final com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis(); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactAnalysis getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleArtifactAnalysis 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.developerconnect.v1.GoogleArtifactAnalysis getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysisOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysisOrBuilder.java new file mode 100644 index 000000000000..c764f754f4a9 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactAnalysisOrBuilder.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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GoogleArtifactAnalysisOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GoogleArtifactAnalysis) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project id of the project where the provenance is stored.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * Required. The project id of the project where the provenance is stored.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistry.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistry.java new file mode 100644 index 000000000000..a197abcaa9d4 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistry.java @@ -0,0 +1,838 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Google Artifact Registry configurations.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GoogleArtifactRegistry} + */ +public final class GoogleArtifactRegistry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.GoogleArtifactRegistry) + GoogleArtifactRegistryOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GoogleArtifactRegistry.newBuilder() to construct. + private GoogleArtifactRegistry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleArtifactRegistry() { + projectId_ = ""; + artifactRegistryPackage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleArtifactRegistry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.class, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object projectId_ = ""; + + /** + * + * + *
+   * Required. The host project of Artifact Registry.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The host project of Artifact Registry.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_REGISTRY_PACKAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object artifactRegistryPackage_ = ""; + + /** + * + * + *
+   * Required. Immutable. The name of the artifact registry package.
+   * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The artifactRegistryPackage. + */ + @java.lang.Override + public java.lang.String getArtifactRegistryPackage() { + java.lang.Object ref = artifactRegistryPackage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactRegistryPackage_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Immutable. The name of the artifact registry package.
+   * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for artifactRegistryPackage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactRegistryPackageBytes() { + java.lang.Object ref = artifactRegistryPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactRegistryPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactRegistryPackage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactRegistryPackage_); + } + 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(projectId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactRegistryPackage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactRegistryPackage_); + } + 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.developerconnect.v1.GoogleArtifactRegistry)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry other = + (com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) obj; + + if (!getProjectId().equals(other.getProjectId())) return false; + if (!getArtifactRegistryPackage().equals(other.getArtifactRegistryPackage())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (37 * hash) + ARTIFACT_REGISTRY_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getArtifactRegistryPackage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry 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.developerconnect.v1.GoogleArtifactRegistry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + 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.developerconnect.v1.GoogleArtifactRegistry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + java.io.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.developerconnect.v1.GoogleArtifactRegistry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseDelimitedFrom( + java.io.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.developerconnect.v1.GoogleArtifactRegistry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.GoogleArtifactRegistry prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Google Artifact Registry configurations.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.GoogleArtifactRegistry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.GoogleArtifactRegistry) + com.google.cloud.developerconnect.v1.GoogleArtifactRegistryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.class, + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + projectId_ = ""; + artifactRegistryPackage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry build() { + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.GoogleArtifactRegistry buildPartial() { + com.google.cloud.developerconnect.v1.GoogleArtifactRegistry result = + new com.google.cloud.developerconnect.v1.GoogleArtifactRegistry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.GoogleArtifactRegistry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.projectId_ = projectId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.artifactRegistryPackage_ = artifactRegistryPackage_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.GoogleArtifactRegistry) { + return mergeFrom((com.google.cloud.developerconnect.v1.GoogleArtifactRegistry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.GoogleArtifactRegistry other) { + if (other == com.google.cloud.developerconnect.v1.GoogleArtifactRegistry.getDefaultInstance()) + return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getArtifactRegistryPackage().isEmpty()) { + artifactRegistryPackage_ = other.artifactRegistryPackage_; + 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: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + artifactRegistryPackage_ = 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 projectId_ = ""; + + /** + * + * + *
+     * Required. The host project of Artifact Registry.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The host project of Artifact Registry.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The host project of Artifact Registry.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The host project of Artifact Registry.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + projectId_ = getDefaultInstance().getProjectId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The host project of Artifact Registry.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + projectId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object artifactRegistryPackage_ = ""; + + /** + * + * + *
+     * Required. Immutable. The name of the artifact registry package.
+     * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The artifactRegistryPackage. + */ + public java.lang.String getArtifactRegistryPackage() { + java.lang.Object ref = artifactRegistryPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactRegistryPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The name of the artifact registry package.
+     * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for artifactRegistryPackage. + */ + public com.google.protobuf.ByteString getArtifactRegistryPackageBytes() { + java.lang.Object ref = artifactRegistryPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactRegistryPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Immutable. The name of the artifact registry package.
+     * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The artifactRegistryPackage to set. + * @return This builder for chaining. + */ + public Builder setArtifactRegistryPackage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + artifactRegistryPackage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The name of the artifact registry package.
+     * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearArtifactRegistryPackage() { + artifactRegistryPackage_ = getDefaultInstance().getArtifactRegistryPackage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The name of the artifact registry package.
+     * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The bytes for artifactRegistryPackage to set. + * @return This builder for chaining. + */ + public Builder setArtifactRegistryPackageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + artifactRegistryPackage_ = 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.developerconnect.v1.GoogleArtifactRegistry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.GoogleArtifactRegistry) + private static final com.google.cloud.developerconnect.v1.GoogleArtifactRegistry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.GoogleArtifactRegistry(); + } + + public static com.google.cloud.developerconnect.v1.GoogleArtifactRegistry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleArtifactRegistry 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.developerconnect.v1.GoogleArtifactRegistry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistryOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistryOrBuilder.java new file mode 100644 index 000000000000..ac0f93fcd9e6 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/GoogleArtifactRegistryOrBuilder.java @@ -0,0 +1,82 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface GoogleArtifactRegistryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.GoogleArtifactRegistry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The host project of Artifact Registry.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + + /** + * + * + *
+   * Required. The host project of Artifact Registry.
+   * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+   * Required. Immutable. The name of the artifact registry package.
+   * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The artifactRegistryPackage. + */ + java.lang.String getArtifactRegistryPackage(); + + /** + * + * + *
+   * Required. Immutable. The name of the artifact registry package.
+   * 
+ * + * + * string artifact_registry_package = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for artifactRegistryPackage. + */ + com.google.protobuf.ByteString getArtifactRegistryPackageBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfig.java new file mode 100644 index 000000000000..c9a8ef784f74 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfig.java @@ -0,0 +1,4521 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * The InsightsConfig resource is the core configuration object to capture
+ * events from your Software Development Lifecycle. It acts as the central hub
+ * for managing how Developer connect understands your application, its runtime
+ * environments, and the artifacts deployed within them.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.InsightsConfig} + */ +public final class InsightsConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.InsightsConfig) + InsightsConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use InsightsConfig.newBuilder() to construct. + private InsightsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InsightsConfig() { + name_ = ""; + runtimeConfigs_ = java.util.Collections.emptyList(); + artifactConfigs_ = java.util.Collections.emptyList(); + state_ = 0; + errors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InsightsConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAnnotations(); + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.InsightsConfig.class, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder.class); + } + + /** + * + * + *
+   * The state of the InsightsConfig.
+   * 
+ * + * Protobuf enum {@code google.cloud.developerconnect.v1.InsightsConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No state specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The InsightsConfig is pending application discovery/runtime discovery.
+     * 
+ * + * PENDING = 5; + */ + PENDING(5), + /** + * + * + *
+     * The initial discovery process is complete.
+     * 
+ * + * COMPLETE = 3; + */ + COMPLETE(3), + /** + * + * + *
+     * The InsightsConfig is in an error state.
+     * 
+ * + * ERROR = 4; + */ + ERROR(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No state specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The InsightsConfig is pending application discovery/runtime discovery.
+     * 
+ * + * PENDING = 5; + */ + public static final int PENDING_VALUE = 5; + + /** + * + * + *
+     * The initial discovery process is complete.
+     * 
+ * + * COMPLETE = 3; + */ + public static final int COMPLETE_VALUE = 3; + + /** + * + * + *
+     * The InsightsConfig is in an error state.
+     * 
+ * + * ERROR = 4; + */ + public static final int ERROR_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 5: + return PENDING; + case 3: + return COMPLETE; + case 4: + return ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.developerconnect.v1.InsightsConfig.State) + } + + private int bitField0_; + private int insightsConfigContextCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object insightsConfigContext_; + + public enum InsightsConfigContextCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + APP_HUB_APPLICATION(4), + INSIGHTSCONFIGCONTEXT_NOT_SET(0); + private final int value; + + private InsightsConfigContextCase(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 InsightsConfigContextCase valueOf(int value) { + return forNumber(value); + } + + public static InsightsConfigContextCase forNumber(int value) { + switch (value) { + case 4: + return APP_HUB_APPLICATION; + case 0: + return INSIGHTSCONFIGCONTEXT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InsightsConfigContextCase getInsightsConfigContextCase() { + return InsightsConfigContextCase.forNumber(insightsConfigContextCase_); + } + + public static final int APP_HUB_APPLICATION_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the appHubApplication field is set. + */ + public boolean hasAppHubApplication() { + return insightsConfigContextCase_ == 4; + } + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appHubApplication. + */ + public java.lang.String getAppHubApplication() { + java.lang.Object ref = ""; + if (insightsConfigContextCase_ == 4) { + ref = insightsConfigContext_; + } + if (ref instanceof java.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 (insightsConfigContextCase_ == 4) { + insightsConfigContext_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appHubApplication. + */ + public com.google.protobuf.ByteString getAppHubApplicationBytes() { + java.lang.Object ref = ""; + if (insightsConfigContextCase_ == 4) { + ref = insightsConfigContext_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (insightsConfigContextCase_ == 4) { + insightsConfigContext_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the InsightsConfig.
+   * Format:
+   * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+   * 
+ * + * 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 InsightsConfig.
+   * Format:
+   * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int RUNTIME_CONFIGS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List runtimeConfigs_; + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRuntimeConfigsList() { + return runtimeConfigs_; + } + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRuntimeConfigsOrBuilderList() { + return runtimeConfigs_; + } + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRuntimeConfigsCount() { + return runtimeConfigs_.size(); + } + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig getRuntimeConfigs(int index) { + return runtimeConfigs_.get(index); + } + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder getRuntimeConfigsOrBuilder( + int index) { + return runtimeConfigs_.get(index); + } + + public static final int ARTIFACT_CONFIGS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List artifactConfigs_; + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getArtifactConfigsList() { + return artifactConfigs_; + } + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getArtifactConfigsOrBuilderList() { + return artifactConfigs_; + } + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getArtifactConfigsCount() { + return artifactConfigs_.size(); + } + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ArtifactConfig getArtifactConfigs(int index) { + return artifactConfigs_.get(index); + } + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder getArtifactConfigsOrBuilder( + int index) { + return artifactConfigs_.get(index); + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_ = 0; + + /** + * + * + *
+   * Optional. Output only. The state of the InsightsConfig.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Optional. Output only. The state of the InsightsConfig.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig.State getState() { + com.google.cloud.developerconnect.v1.InsightsConfig.State result = + com.google.cloud.developerconnect.v1.InsightsConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.State.UNRECOGNIZED + : result; + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 8; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 9; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RECONCILING_FIELD_NUMBER = 10; + private boolean reconciling_ = false; + + /** + * + * + *
+   * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+   * Set to true if the current state of InsightsConfig does not match the
+   * user's intended state, and the service is actively updating the resource to
+   * reconcile them. This can happen due to user-triggered updates or
+   * system actions like failover or maintenance.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + public static final int ERRORS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List errors_; + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getErrorsOrBuilderList() { + return errors_; + } + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.Status getErrors(int index) { + return errors_.get(index); + } + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (insightsConfigContextCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, insightsConfigContext_); + } + for (int i = 0; i < runtimeConfigs_.size(); i++) { + output.writeMessage(5, runtimeConfigs_.get(i)); + } + for (int i = 0; i < artifactConfigs_.size(); i++) { + output.writeMessage(6, artifactConfigs_.get(i)); + } + if (state_ + != com.google.cloud.developerconnect.v1.InsightsConfig.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, state_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 9); + if (reconciling_ != false) { + output.writeBool(10, reconciling_); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(11, errors_.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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (insightsConfigContextCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, insightsConfigContext_); + } + for (int i = 0; i < runtimeConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, runtimeConfigs_.get(i)); + } + for (int i = 0; i < artifactConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, artifactConfigs_.get(i)); + } + if (state_ + != com.google.cloud.developerconnect.v1.InsightsConfig.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, state_); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, annotations__); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, labels__); + } + if (reconciling_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, reconciling_); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, errors_.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.developerconnect.v1.InsightsConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.InsightsConfig other = + (com.google.cloud.developerconnect.v1.InsightsConfig) obj; + + if (!getName().equals(other.getName())) 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 (!getRuntimeConfigsList().equals(other.getRuntimeConfigsList())) return false; + if (!getArtifactConfigsList().equals(other.getArtifactConfigsList())) return false; + if (state_ != other.state_) return false; + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getReconciling() != other.getReconciling()) return false; + if (!getErrorsList().equals(other.getErrorsList())) return false; + if (!getInsightsConfigContextCase().equals(other.getInsightsConfigContextCase())) return false; + switch (insightsConfigContextCase_) { + case 4: + if (!getAppHubApplication().equals(other.getAppHubApplication())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getRuntimeConfigsCount() > 0) { + hash = (37 * hash) + RUNTIME_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getRuntimeConfigsList().hashCode(); + } + if (getArtifactConfigsCount() > 0) { + hash = (37 * hash) + ARTIFACT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getArtifactConfigsList().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + RECONCILING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling()); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + switch (insightsConfigContextCase_) { + case 4: + hash = (37 * hash) + APP_HUB_APPLICATION_FIELD_NUMBER; + hash = (53 * hash) + getAppHubApplication().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig 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.developerconnect.v1.InsightsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + 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.developerconnect.v1.InsightsConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + java.io.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.developerconnect.v1.InsightsConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.InsightsConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.InsightsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 InsightsConfig resource is the core configuration object to capture
+   * events from your Software Development Lifecycle. It acts as the central hub
+   * for managing how Developer connect understands your application, its runtime
+   * environments, and the artifacts deployed within them.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.InsightsConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.InsightsConfig) + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetAnnotations(); + case 9: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 8: + return internalGetMutableAnnotations(); + case 9: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.InsightsConfig.class, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.InsightsConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getRuntimeConfigsFieldBuilder(); + getArtifactConfigsFieldBuilder(); + getErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + if (runtimeConfigsBuilder_ == null) { + runtimeConfigs_ = java.util.Collections.emptyList(); + } else { + runtimeConfigs_ = null; + runtimeConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (artifactConfigsBuilder_ == null) { + artifactConfigs_ = java.util.Collections.emptyList(); + } else { + artifactConfigs_ = null; + artifactConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + reconciling_ = false; + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + } else { + errors_ = null; + errorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + insightsConfigContextCase_ = 0; + insightsConfigContext_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig build() { + com.google.cloud.developerconnect.v1.InsightsConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig buildPartial() { + com.google.cloud.developerconnect.v1.InsightsConfig result = + new com.google.cloud.developerconnect.v1.InsightsConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.developerconnect.v1.InsightsConfig result) { + if (runtimeConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + runtimeConfigs_ = java.util.Collections.unmodifiableList(runtimeConfigs_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.runtimeConfigs_ = runtimeConfigs_; + } else { + result.runtimeConfigs_ = runtimeConfigsBuilder_.build(); + } + if (artifactConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + artifactConfigs_ = java.util.Collections.unmodifiableList(artifactConfigs_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.artifactConfigs_ = artifactConfigs_; + } else { + result.artifactConfigs_ = artifactConfigsBuilder_.build(); + } + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.InsightsConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.reconciling_ = reconciling_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.developerconnect.v1.InsightsConfig result) { + result.insightsConfigContextCase_ = insightsConfigContextCase_; + result.insightsConfigContext_ = this.insightsConfigContext_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.InsightsConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.InsightsConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.InsightsConfig other) { + if (other == com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (runtimeConfigsBuilder_ == null) { + if (!other.runtimeConfigs_.isEmpty()) { + if (runtimeConfigs_.isEmpty()) { + runtimeConfigs_ = other.runtimeConfigs_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.addAll(other.runtimeConfigs_); + } + onChanged(); + } + } else { + if (!other.runtimeConfigs_.isEmpty()) { + if (runtimeConfigsBuilder_.isEmpty()) { + runtimeConfigsBuilder_.dispose(); + runtimeConfigsBuilder_ = null; + runtimeConfigs_ = other.runtimeConfigs_; + bitField0_ = (bitField0_ & ~0x00000010); + runtimeConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRuntimeConfigsFieldBuilder() + : null; + } else { + runtimeConfigsBuilder_.addAllMessages(other.runtimeConfigs_); + } + } + } + if (artifactConfigsBuilder_ == null) { + if (!other.artifactConfigs_.isEmpty()) { + if (artifactConfigs_.isEmpty()) { + artifactConfigs_ = other.artifactConfigs_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.addAll(other.artifactConfigs_); + } + onChanged(); + } + } else { + if (!other.artifactConfigs_.isEmpty()) { + if (artifactConfigsBuilder_.isEmpty()) { + artifactConfigsBuilder_.dispose(); + artifactConfigsBuilder_ = null; + artifactConfigs_ = other.artifactConfigs_; + bitField0_ = (bitField0_ & ~0x00000020); + artifactConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getArtifactConfigsFieldBuilder() + : null; + } else { + artifactConfigsBuilder_.addAllMessages(other.artifactConfigs_); + } + } + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000080; + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000100; + if (other.getReconciling() != false) { + setReconciling(other.getReconciling()); + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000400); + errorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + switch (other.getInsightsConfigContextCase()) { + case APP_HUB_APPLICATION: + { + insightsConfigContextCase_ = 4; + insightsConfigContext_ = other.insightsConfigContext_; + onChanged(); + break; + } + case INSIGHTSCONFIGCONTEXT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + insightsConfigContextCase_ = 4; + insightsConfigContext_ = s; + break; + } // case 34 + case 42: + { + com.google.cloud.developerconnect.v1.RuntimeConfig m = + input.readMessage( + com.google.cloud.developerconnect.v1.RuntimeConfig.parser(), + extensionRegistry); + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.add(m); + } else { + runtimeConfigsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.developerconnect.v1.ArtifactConfig m = + input.readMessage( + com.google.cloud.developerconnect.v1.ArtifactConfig.parser(), + extensionRegistry); + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.add(m); + } else { + artifactConfigsBuilder_.addMessage(m); + } + break; + } // case 50 + case 56: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + reconciling_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(m); + } else { + errorsBuilder_.addMessage(m); + } + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int insightsConfigContextCase_ = 0; + private java.lang.Object insightsConfigContext_; + + public InsightsConfigContextCase getInsightsConfigContextCase() { + return InsightsConfigContextCase.forNumber(insightsConfigContextCase_); + } + + public Builder clearInsightsConfigContext() { + insightsConfigContextCase_ = 0; + insightsConfigContext_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the appHubApplication field is set. + */ + @java.lang.Override + public boolean hasAppHubApplication() { + return insightsConfigContextCase_ == 4; + } + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appHubApplication. + */ + @java.lang.Override + public java.lang.String getAppHubApplication() { + java.lang.Object ref = ""; + if (insightsConfigContextCase_ == 4) { + ref = insightsConfigContext_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (insightsConfigContextCase_ == 4) { + insightsConfigContext_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appHubApplication. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppHubApplicationBytes() { + java.lang.Object ref = ""; + if (insightsConfigContextCase_ == 4) { + ref = insightsConfigContext_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (insightsConfigContextCase_ == 4) { + insightsConfigContext_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The appHubApplication to set. + * @return This builder for chaining. + */ + public Builder setAppHubApplication(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + insightsConfigContextCase_ = 4; + insightsConfigContext_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAppHubApplication() { + if (insightsConfigContextCase_ == 4) { + insightsConfigContextCase_ = 0; + insightsConfigContext_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The name of the App Hub Application.
+     * Format:
+     * projects/{project}/locations/{location}/applications/{application}
+     * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for appHubApplication to set. + * @return This builder for chaining. + */ + public Builder setAppHubApplicationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + insightsConfigContextCase_ = 4; + insightsConfigContext_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the InsightsConfig.
+     * Format:
+     * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+     * 
+ * + * 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 InsightsConfig.
+     * Format:
+     * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+     * 
+ * + * 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 InsightsConfig.
+     * Format:
+     * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+     * 
+ * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the InsightsConfig.
+     * Format:
+     * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the InsightsConfig.
+     * Format:
+     * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+     * 
+ * + * 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_ |= 0x00000002; + 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. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Create timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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. [Output only] Update timestamp
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.util.List runtimeConfigs_ = + java.util.Collections.emptyList(); + + private void ensureRuntimeConfigsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + runtimeConfigs_ = + new java.util.ArrayList( + runtimeConfigs_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.RuntimeConfig, + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder, + com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder> + runtimeConfigsBuilder_; + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRuntimeConfigsList() { + if (runtimeConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(runtimeConfigs_); + } else { + return runtimeConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRuntimeConfigsCount() { + if (runtimeConfigsBuilder_ == null) { + return runtimeConfigs_.size(); + } else { + return runtimeConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.RuntimeConfig getRuntimeConfigs(int index) { + if (runtimeConfigsBuilder_ == null) { + return runtimeConfigs_.get(index); + } else { + return runtimeConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRuntimeConfigs( + int index, com.google.cloud.developerconnect.v1.RuntimeConfig value) { + if (runtimeConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.set(index, value); + onChanged(); + } else { + runtimeConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRuntimeConfigs( + int index, com.google.cloud.developerconnect.v1.RuntimeConfig.Builder builderForValue) { + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + runtimeConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRuntimeConfigs(com.google.cloud.developerconnect.v1.RuntimeConfig value) { + if (runtimeConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.add(value); + onChanged(); + } else { + runtimeConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRuntimeConfigs( + int index, com.google.cloud.developerconnect.v1.RuntimeConfig value) { + if (runtimeConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.add(index, value); + onChanged(); + } else { + runtimeConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRuntimeConfigs( + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder builderForValue) { + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.add(builderForValue.build()); + onChanged(); + } else { + runtimeConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRuntimeConfigs( + int index, com.google.cloud.developerconnect.v1.RuntimeConfig.Builder builderForValue) { + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + runtimeConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRuntimeConfigs( + java.lang.Iterable values) { + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, runtimeConfigs_); + onChanged(); + } else { + runtimeConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRuntimeConfigs() { + if (runtimeConfigsBuilder_ == null) { + runtimeConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + runtimeConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRuntimeConfigs(int index) { + if (runtimeConfigsBuilder_ == null) { + ensureRuntimeConfigsIsMutable(); + runtimeConfigs_.remove(index); + onChanged(); + } else { + runtimeConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.RuntimeConfig.Builder getRuntimeConfigsBuilder( + int index) { + return getRuntimeConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder getRuntimeConfigsOrBuilder( + int index) { + if (runtimeConfigsBuilder_ == null) { + return runtimeConfigs_.get(index); + } else { + return runtimeConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRuntimeConfigsOrBuilderList() { + if (runtimeConfigsBuilder_ != null) { + return runtimeConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(runtimeConfigs_); + } + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.RuntimeConfig.Builder addRuntimeConfigsBuilder() { + return getRuntimeConfigsFieldBuilder() + .addBuilder(com.google.cloud.developerconnect.v1.RuntimeConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.RuntimeConfig.Builder addRuntimeConfigsBuilder( + int index) { + return getRuntimeConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.developerconnect.v1.RuntimeConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The runtime configurations where the application is deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRuntimeConfigsBuilderList() { + return getRuntimeConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.RuntimeConfig, + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder, + com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder> + getRuntimeConfigsFieldBuilder() { + if (runtimeConfigsBuilder_ == null) { + runtimeConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.RuntimeConfig, + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder, + com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder>( + runtimeConfigs_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + runtimeConfigs_ = null; + } + return runtimeConfigsBuilder_; + } + + private java.util.List artifactConfigs_ = + java.util.Collections.emptyList(); + + private void ensureArtifactConfigsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + artifactConfigs_ = + new java.util.ArrayList( + artifactConfigs_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.ArtifactConfig, + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder, + com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder> + artifactConfigsBuilder_; + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getArtifactConfigsList() { + if (artifactConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(artifactConfigs_); + } else { + return artifactConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getArtifactConfigsCount() { + if (artifactConfigsBuilder_ == null) { + return artifactConfigs_.size(); + } else { + return artifactConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ArtifactConfig getArtifactConfigs(int index) { + if (artifactConfigsBuilder_ == null) { + return artifactConfigs_.get(index); + } else { + return artifactConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArtifactConfigs( + int index, com.google.cloud.developerconnect.v1.ArtifactConfig value) { + if (artifactConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactConfigsIsMutable(); + artifactConfigs_.set(index, value); + onChanged(); + } else { + artifactConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setArtifactConfigs( + int index, com.google.cloud.developerconnect.v1.ArtifactConfig.Builder builderForValue) { + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + artifactConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArtifactConfigs(com.google.cloud.developerconnect.v1.ArtifactConfig value) { + if (artifactConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactConfigsIsMutable(); + artifactConfigs_.add(value); + onChanged(); + } else { + artifactConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArtifactConfigs( + int index, com.google.cloud.developerconnect.v1.ArtifactConfig value) { + if (artifactConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureArtifactConfigsIsMutable(); + artifactConfigs_.add(index, value); + onChanged(); + } else { + artifactConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArtifactConfigs( + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder builderForValue) { + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.add(builderForValue.build()); + onChanged(); + } else { + artifactConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addArtifactConfigs( + int index, com.google.cloud.developerconnect.v1.ArtifactConfig.Builder builderForValue) { + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + artifactConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllArtifactConfigs( + java.lang.Iterable values) { + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, artifactConfigs_); + onChanged(); + } else { + artifactConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearArtifactConfigs() { + if (artifactConfigsBuilder_ == null) { + artifactConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + artifactConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeArtifactConfigs(int index) { + if (artifactConfigsBuilder_ == null) { + ensureArtifactConfigsIsMutable(); + artifactConfigs_.remove(index); + onChanged(); + } else { + artifactConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ArtifactConfig.Builder getArtifactConfigsBuilder( + int index) { + return getArtifactConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder getArtifactConfigsOrBuilder( + int index) { + if (artifactConfigsBuilder_ == null) { + return artifactConfigs_.get(index); + } else { + return artifactConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getArtifactConfigsOrBuilderList() { + if (artifactConfigsBuilder_ != null) { + return artifactConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(artifactConfigs_); + } + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ArtifactConfig.Builder addArtifactConfigsBuilder() { + return getArtifactConfigsFieldBuilder() + .addBuilder(com.google.cloud.developerconnect.v1.ArtifactConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.developerconnect.v1.ArtifactConfig.Builder addArtifactConfigsBuilder( + int index) { + return getArtifactConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.developerconnect.v1.ArtifactConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The artifact configurations of the artifacts that are deployed.
+     * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getArtifactConfigsBuilderList() { + return getArtifactConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.ArtifactConfig, + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder, + com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder> + getArtifactConfigsFieldBuilder() { + if (artifactConfigsBuilder_ == null) { + artifactConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.ArtifactConfig, + com.google.cloud.developerconnect.v1.ArtifactConfig.Builder, + com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder>( + artifactConfigs_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + artifactConfigs_ = null; + } + return artifactConfigsBuilder_; + } + + private int state_ = 0; + + /** + * + * + *
+     * Optional. Output only. The state of the InsightsConfig.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Optional. Output only. The state of the InsightsConfig.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The state of the InsightsConfig.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig.State getState() { + com.google.cloud.developerconnect.v1.InsightsConfig.State result = + com.google.cloud.developerconnect.v1.InsightsConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. Output only. The state of the InsightsConfig.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.developerconnect.v1.InsightsConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Output only. The state of the InsightsConfig.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000080; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000080; + return internalGetMutableAnnotations().getMutableMap(); + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Optional. User specified annotations. See
+     * https://google.aip.dev/148#annotations for more details such as format and
+     * size limitations.
+     * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000100; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000100); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000100; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000100; + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with an InsightsConfig.
+     * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000100; + return this; + } + + private boolean reconciling_; + + /** + * + * + *
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of InsightsConfig does not match the
+     * user's intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + @java.lang.Override + public boolean getReconciling() { + return reconciling_; + } + + /** + * + * + *
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of InsightsConfig does not match the
+     * user's intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The reconciling to set. + * @return This builder for chaining. + */ + public Builder setReconciling(boolean value) { + + reconciling_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+     * Set to true if the current state of InsightsConfig does not match the
+     * user's intended state, and the service is actively updating the resource to
+     * reconcile them. This can happen due to user-triggered updates or
+     * system actions like failover or maintenance.
+     * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearReconciling() { + bitField0_ = (bitField0_ & ~0x00000200); + reconciling_ = false; + onChanged(); + return this; + } + + private java.util.List errors_ = java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + errors_ = new java.util.ArrayList(errors_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setErrors(int index, com.google.rpc.Status value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addErrors(com.google.rpc.Status value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addErrors(int index, com.google.rpc.Status value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addErrors(com.google.rpc.Status.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addErrors(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllErrors(java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder getErrorsBuilder(int index) { + return getErrorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.StatusOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addErrorsBuilder() { + return getErrorsFieldBuilder().addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.rpc.Status.Builder addErrorsBuilder(int index) { + return getErrorsFieldBuilder().addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. Any errors that occurred while setting up the InsightsConfig.
+     * Each error will be in the format: `field_name: error_message`, e.g.
+     * GetAppHubApplication: Permission denied while getting App Hub
+     * application. Please grant permissions to the P4SA.
+     * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getErrorsBuilderList() { + return getErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errors_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.InsightsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.InsightsConfig) + private static final com.google.cloud.developerconnect.v1.InsightsConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.InsightsConfig(); + } + + public static com.google.cloud.developerconnect.v1.InsightsConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InsightsConfig 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.developerconnect.v1.InsightsConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigName.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigName.java new file mode 100644 index 000000000000..991d7c3897ad --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigName.java @@ -0,0 +1,227 @@ +/* + * 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.developerconnect.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 InsightsConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSIGHTS_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/insightsConfigs/{insights_config}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String insightsConfig; + + @Deprecated + protected InsightsConfigName() { + project = null; + location = null; + insightsConfig = null; + } + + private InsightsConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + insightsConfig = Preconditions.checkNotNull(builder.getInsightsConfig()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInsightsConfig() { + return insightsConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static InsightsConfigName of(String project, String location, String insightsConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInsightsConfig(insightsConfig) + .build(); + } + + public static String format(String project, String location, String insightsConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInsightsConfig(insightsConfig) + .build() + .toString(); + } + + public static InsightsConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSIGHTS_CONFIG.validatedMatch( + formattedString, "InsightsConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("insights_config")); + } + + 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 (InsightsConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSIGHTS_CONFIG.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 (insightsConfig != null) { + fieldMapBuilder.put("insights_config", insightsConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSIGHTS_CONFIG.instantiate( + "project", project, "location", location, "insights_config", insightsConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + InsightsConfigName that = ((InsightsConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.insightsConfig, that.insightsConfig); + } + 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(insightsConfig); + return h; + } + + /** Builder for projects/{project}/locations/{location}/insightsConfigs/{insights_config}. */ + public static class Builder { + private String project; + private String location; + private String insightsConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInsightsConfig() { + return insightsConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInsightsConfig(String insightsConfig) { + this.insightsConfig = insightsConfig; + return this; + } + + private Builder(InsightsConfigName insightsConfigName) { + this.project = insightsConfigName.project; + this.location = insightsConfigName.location; + this.insightsConfig = insightsConfigName.insightsConfig; + } + + public InsightsConfigName build() { + return new InsightsConfigName(this); + } + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigOrBuilder.java new file mode 100644 index 000000000000..a0d119d74606 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigOrBuilder.java @@ -0,0 +1,580 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface InsightsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.InsightsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the appHubApplication field is set. + */ + boolean hasAppHubApplication(); + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appHubApplication. + */ + java.lang.String getAppHubApplication(); + + /** + * + * + *
+   * Optional. The name of the App Hub Application.
+   * Format:
+   * projects/{project}/locations/{location}/applications/{application}
+   * 
+ * + * string app_hub_application = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appHubApplication. + */ + com.google.protobuf.ByteString getAppHubApplicationBytes(); + + /** + * + * + *
+   * Identifier. The name of the InsightsConfig.
+   * Format:
+   * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the InsightsConfig.
+   * Format:
+   * projects/{project}/locations/{location}/insightsConfigs/{insightsConfig}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. [Output only] Create timestamp
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. [Output only] Update timestamp
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRuntimeConfigsList(); + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.developerconnect.v1.RuntimeConfig getRuntimeConfigs(int index); + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRuntimeConfigsCount(); + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRuntimeConfigsOrBuilderList(); + + /** + * + * + *
+   * Output only. The runtime configurations where the application is deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.RuntimeConfig runtime_configs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder getRuntimeConfigsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getArtifactConfigsList(); + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.ArtifactConfig getArtifactConfigs(int index); + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getArtifactConfigsCount(); + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getArtifactConfigsOrBuilderList(); + + /** + * + * + *
+   * Optional. The artifact configurations of the artifacts that are deployed.
+   * 
+ * + * + * repeated .google.cloud.developerconnect.v1.ArtifactConfig artifact_configs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.developerconnect.v1.ArtifactConfigOrBuilder getArtifactConfigsOrBuilder( + int index); + + /** + * + * + *
+   * Optional. Output only. The state of the InsightsConfig.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Optional. Output only. The state of the InsightsConfig.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig.State state = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The state. + */ + com.google.cloud.developerconnect.v1.InsightsConfig.State getState(); + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. User specified annotations. See
+   * https://google.aip.dev/148#annotations for more details such as format and
+   * size limitations.
+   * 
+ * + * map<string, string> annotations = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Set of labels associated with an InsightsConfig.
+   * 
+ * + * map<string, string> labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
+   * Set to true if the current state of InsightsConfig does not match the
+   * user's intended state, and the service is actively updating the resource to
+   * reconcile them. This can happen due to user-triggered updates or
+   * system actions like failover or maintenance.
+   * 
+ * + * bool reconciling = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The reconciling. + */ + boolean getReconciling(); + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getErrorsList(); + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.Status getErrors(int index); + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getErrorsCount(); + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getErrorsOrBuilderList(); + + /** + * + * + *
+   * Output only. Any errors that occurred while setting up the InsightsConfig.
+   * Each error will be in the format: `field_name: error_message`, e.g.
+   * GetAppHubApplication: Permission denied while getting App Hub
+   * application. Please grant permissions to the P4SA.
+   * 
+ * + * repeated .google.rpc.Status errors = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.rpc.StatusOrBuilder getErrorsOrBuilder(int index); + + com.google.cloud.developerconnect.v1.InsightsConfig.InsightsConfigContextCase + getInsightsConfigContextCase(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigProto.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigProto.java new file mode 100644 index 000000000000..0708322896ef --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/InsightsConfigProto.java @@ -0,0 +1,422 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public final class InsightsConfigProto { + private InsightsConfigProto() {} + + 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_developerconnect_v1_InsightsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_InsightsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_RuntimeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GKEWorkload_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_AppHubWorkload_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ArtifactConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_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" + + "6google/cloud/developerconnect/v1/insights_config.proto\022 google.cloud.developer" + + "connect.v1\032\034google/api/annotations.proto" + + "\032\027google/api/client.proto\032\037google/api/fi" + + "eld_behavior.proto\032\033google/api/field_inf" + + "o.proto\032\031google/api/resource.proto\0328goog" + + "le/cloud/developerconnect/v1/developer_connect.proto\032#google/longrunning/operati" + + "ons.proto\032\033google/protobuf/empty.proto\032\037" + + "google/protobuf/timestamp.proto\032\027google/rpc/status.proto\"\374\007\n" + + "\016InsightsConfig\022\"\n" + + "\023app_hub_application\030\004 \001(\tB\003\340A\001H\000\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\022M\n" + + "\017runtime_configs\030\005" + + " \003(\0132/.google.cloud.developerconnect.v1.RuntimeConfigB\003\340A\003\022O\n" + + "\020artifact_configs\030\006 \003(\01320.google.cloud.d" + + "eveloperconnect.v1.ArtifactConfigB\003\340A\001\022J\n" + + "\005state\030\007" + + " \001(\01626.google.cloud.developerconnect.v1.InsightsConfig.StateB\003\340A\001\022[\n" + + "\013annotations\030\010 \003(\0132A.google.cloud.developer" + + "connect.v1.InsightsConfig.AnnotationsEntryB\003\340A\001\022Q\n" + + "\006labels\030\t \003(\0132<.google.cloud.d" + + "eveloperconnect.v1.InsightsConfig.LabelsEntryB\003\340A\001\022\030\n" + + "\013reconciling\030\n" + + " \001(\010B\003\340A\003\022\'\n" + + "\006errors\030\013 \003(\0132\022.google.rpc.StatusB\003\340A\003\0322\n" + + "\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"D\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\013\n" + + "\007PENDING\020\005\022\014\n" + + "\010COMPLETE\020\003\022\t\n" + + "\005ERROR\020\004:\243\001\352A\237\001\n" + + ".developerconnect.googleapis.com/InsightsConfig\022Iprojects/{project" + + "}/locations/{location}/insightsConfigs/{" + + "insights_config}*\017insightsConfigs2\016insightsConfigR\001\001B\031\n" + + "\027insights_config_context\"\343\002\n\r" + + "RuntimeConfig\022J\n" + + "\014gke_workload\030\003 \001(\0132" + + "-.google.cloud.developerconnect.v1.GKEWorkloadB\003\340A\003H\000\022Q\n" + + "\020app_hub_workload\030\004 \001(\0132" + + "0.google.cloud.developerconnect.v1.AppHubWorkloadB\003\340A\003H\001\022\023\n" + + "\003uri\030\001 \001(\tB\006\340A\002\340A\005\022I\n" + + "\005state\030\002" + + " \001(\01625.google.cloud.developerconnect.v1.RuntimeConfig.StateB\003\340A\003\"8\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006LINKED\020\001\022\014\n" + + "\010UNLINKED\020\002B\t\n" + + "\007runtimeB\016\n" + + "\014derived_from\"?\n" + + "\013GKEWorkload\022\027\n" + + "\007cluster\030\001 \001(\tB\006\340A\002\340A\005\022\027\n" + + "\n" + + "deployment\030\002 \001(\tB\003\340A\003\"a\n" + + "\016AppHubWorkload\022\033\n" + + "\010workload\030\001 \001(\tB\t\340A\002\340A\005\340A\003\022\030\n" + + "\013criticality\030\002 \001(\tB\003\340A\003\022\030\n" + + "\013environment\030\003 \001(\tB\003\340A\003\"\234\002\n" + + "\016ArtifactConfig\022a\n" + + "\030google_artifact_registry\030\002 \001(\01328.google.cloud.developerc" + + "onnect.v1.GoogleArtifactRegistryB\003\340A\001H\000\022a\n" + + "\030google_artifact_analysis\030\003 \001(\01328.goog" + + "le.cloud.developerconnect.v1.GoogleArtifactAnalysisB\003\340A\001H\001\022\023\n" + + "\003uri\030\001 \001(\tB\006\340A\002\340A\005B\022\n" + + "\020artifact_storageB\033\n" + + "\031artifact_metadata_storage\"1\n" + + "\026GoogleArtifactAnalysis\022\027\n\n" + + "project_id\030\001 \001(\tB\003\340A\002\"\\\n" + + "\026GoogleArtifactRegistry\022\027\n\n" + + "project_id\030\001 \001(\tB\003\340A\002\022)\n" + + "\031artifact_registry_package\030\002 \001(\tB\006\340A\002\340A\005\"\362\001\n" + + "\033CreateInsightsConfigRequest\022F\n" + + "\006parent\030\001 \001(" + + "\tB6\340A\002\372A0\022.developerconnect.googleapis.com/InsightsConfig\022\037\n" + + "\022insights_config_id\030\002 \001(\tB\003\340A\002\022N\n" + + "\017insights_config\030\003 \001(\01320.go" + + "ogle.cloud.developerconnect.v1.InsightsConfigB\003\340A\002\022\032\n\r" + + "validate_only\030\004 \001(\010B\003\340A\001\"`\n" + + "\030GetInsightsConfigRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".developerconnect.googleapis.com/InsightsConfig\"\301\001\n" + + "\032ListInsightsConfigsRequest\022F\n" + + "\006parent\030\001 \001(\tB6\340A\002\372A0\022.develop" + + "erconnect.googleapis.com/InsightsConfig\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\227\001\n" + + "\033ListInsightsConfigsResponse\022J\n" + + "\020insights_configs\030\001 \003(\01320.google." + + "cloud.developerconnect.v1.InsightsConfig\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\263\001\n" + + "\033DeleteInsightsConfigRequest\022D\n" + + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + + ".developerconnect.googleapis.com/InsightsConfig\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "validate_only\030\003 \001(\010B\003\340A\001\022\021\n" + + "\004etag\030\004 \001(\tB\003\340A\001\"\306\001\n" + + "\033UpdateInsightsConfigRequest\022N\n" + + "\017insights_config\030\002" + + " \001(\01320.google.cloud.developerconnect.v1.InsightsConfigB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\032\n\r" + + "allow_missing\030\004 \001(\010B\003\340A\001\022\032\n\r" + + "validate_only\030\005 \001(\010B\003\340A\0012\357\n\n" + + "\025InsightsConfigService\022\330\001\n" + + "\023ListInsightsConfigs\022<.google.cloud.developerconnect.v1.ListI" + + "nsightsConfigsRequest\032=.google.cloud.developerconnect.v1.ListInsightsConfigsResp" + + "onse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=projects/*/locations/*}/insightsConfigs\022\266\002\n" + + "\024CreateInsightsConfig\022=.google.cloud.devel" + + "operconnect.v1.CreateInsightsConfigRequest\032\035.google.longrunning.Operation\"\277\001\312AD\n" + + "\016InsightsConfig\0222google.cloud.developerc" + + "onnect.v1.OperationMetadata\332A)parent,ins" + + "ights_config,insights_config_id\202\323\344\223\002F\"3/" + + "v1/{parent=projects/*/locations/*}/insightsConfigs:\017insights_config\022\305\001\n" + + "\021GetInsightsConfig\022:.google.cloud.developerconnec" + + "t.v1.GetInsightsConfigRequest\0320.google.cloud.developerconnect.v1.InsightsConfig\"" + + "B\332A\004name\202\323\344\223\0025\0223/v1/{name=projects/*/locations/*/insightsConfigs/*}\022\232\002\n" + + "\024UpdateInsightsConfig\022=.google.cloud.developercon" + + "nect.v1.UpdateInsightsConfigRequest\032\035.google.longrunning.Operation\"\243\001\312AD\n" + + "\016InsightsConfig\0222google.cloud.developerconnect." + + "v1.OperationMetadata\202\323\344\223\002V2C/v1/{insight" + + "s_config.name=projects/*/locations/*/insightsConfigs/*}:\017insights_config\022\207\002\n" + + "\024DeleteInsightsConfig\022=.google.cloud.develop" + + "erconnect.v1.DeleteInsightsConfigRequest\032\035.google.longrunning.Operation\"\220\001\312AK\n" + + "\025google.protobuf.Empty\0222google.cloud.devel" + + "operconnect.v1.OperationMetadata\332A\004name\202" + + "\323\344\223\0025*3/v1/{name=projects/*/locations/*/" + + "insightsConfigs/*}\032S\312A\037developerconnect." + + "googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\325\001\n" + + "$com.google.cloud.developerconnect.v1B\023InsightsConfig" + + "ProtoP\001ZPcloud.google.com/go/developerco" + + "nnect/apiv1/developerconnectpb;developerconnectpb\252\002" + + " Google.Cloud.DeveloperConnect.V1\312\002 Google\\Cloud\\DeveloperConnect\\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.FieldInfoProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.developerconnect.v1.DeveloperConnectProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor, + new java.lang.String[] { + "AppHubApplication", + "Name", + "CreateTime", + "UpdateTime", + "RuntimeConfigs", + "ArtifactConfigs", + "State", + "Annotations", + "Labels", + "Reconciling", + "Errors", + "InsightsConfigContext", + }); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_descriptor = + internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_InsightsConfig_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_descriptor = + internal_static_google_cloud_developerconnect_v1_InsightsConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_InsightsConfig_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_developerconnect_v1_RuntimeConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor, + new java.lang.String[] { + "GkeWorkload", "AppHubWorkload", "Uri", "State", "Runtime", "DerivedFrom", + }); + internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_developerconnect_v1_GKEWorkload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GKEWorkload_descriptor, + new java.lang.String[] { + "Cluster", "Deployment", + }); + internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_developerconnect_v1_AppHubWorkload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_AppHubWorkload_descriptor, + new java.lang.String[] { + "Workload", "Criticality", "Environment", + }); + internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_developerconnect_v1_ArtifactConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ArtifactConfig_descriptor, + new java.lang.String[] { + "GoogleArtifactRegistry", + "GoogleArtifactAnalysis", + "Uri", + "ArtifactStorage", + "ArtifactMetadataStorage", + }); + internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GoogleArtifactAnalysis_descriptor, + new java.lang.String[] { + "ProjectId", + }); + internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GoogleArtifactRegistry_descriptor, + new java.lang.String[] { + "ProjectId", "ArtifactRegistryPackage", + }); + internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_CreateInsightsConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "InsightsConfigId", "InsightsConfig", "ValidateOnly", + }); + internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_GetInsightsConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor, + new java.lang.String[] { + "InsightsConfigs", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_DeleteInsightsConfigRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "ValidateOnly", "Etag", + }); + internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor, + new java.lang.String[] { + "InsightsConfig", "RequestId", "AllowMissing", "ValidateOnly", + }); + 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.FieldInfoProto.fieldInfo); + 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); + 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.FieldInfoProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.developerconnect.v1.DeveloperConnectProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequest.java new file mode 100644 index 000000000000..a46b8f9fe6ad --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequest.java @@ -0,0 +1,1326 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for requesting list of AccountConnectors
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListAccountConnectorsRequest} + */ +public final class ListAccountConnectorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListAccountConnectorsRequest) + ListAccountConnectorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAccountConnectorsRequest.newBuilder() to construct. + private ListAccountConnectorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountConnectorsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountConnectorsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.class, + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListAccountConnectorsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListAccountConnectorsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.developerconnect.v1.ListAccountConnectorsRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest other = + (com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest 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.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + 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.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + java.io.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.developerconnect.v1.ListAccountConnectorsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest + parseDelimitedFrom( + java.io.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.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListAccountConnectorsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of AccountConnectors
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListAccountConnectorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListAccountConnectorsRequest) + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.class, + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest build() { + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest buildPartial() { + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest result = + new com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListAccountConnectorsRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest other) { + if (other + == com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListAccountConnectorsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListAccountConnectorsRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListAccountConnectorsRequest
+     * 
+ * + * + * 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. Parent value for ListAccountConnectorsRequest
+     * 
+ * + * + * 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. Parent value for ListAccountConnectorsRequest
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.ListAccountConnectorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListAccountConnectorsRequest) + private static final com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest(); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountConnectorsRequest 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.developerconnect.v1.ListAccountConnectorsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequestOrBuilder.java new file mode 100644 index 000000000000..0ebf80e7e978 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsRequestOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListAccountConnectorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListAccountConnectorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListAccountConnectorsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListAccountConnectorsRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponse.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponse.java new file mode 100644 index 000000000000..97c4bc919453 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponse.java @@ -0,0 +1,1494 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for response to listing AccountConnectors
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListAccountConnectorsResponse} + */ +public final class ListAccountConnectorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListAccountConnectorsResponse) + ListAccountConnectorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAccountConnectorsResponse.newBuilder() to construct. + private ListAccountConnectorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountConnectorsResponse() { + accountConnectors_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountConnectorsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.class, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.Builder.class); + } + + public static final int ACCOUNT_CONNECTORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List accountConnectors_; + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + @java.lang.Override + public java.util.List + getAccountConnectorsList() { + return accountConnectors_; + } + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + @java.lang.Override + public java.util.List + getAccountConnectorsOrBuilderList() { + return accountConnectors_; + } + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + @java.lang.Override + public int getAccountConnectorsCount() { + return accountConnectors_.size(); + } + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnectors(int index) { + return accountConnectors_.get(index); + } + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorsOrBuilder(int index) { + return accountConnectors_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < accountConnectors_.size(); i++) { + output.writeMessage(1, accountConnectors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < accountConnectors_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, accountConnectors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.developerconnect.v1.ListAccountConnectorsResponse)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse other = + (com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse) obj; + + if (!getAccountConnectorsList().equals(other.getAccountConnectorsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getAccountConnectorsCount() > 0) { + hash = (37 * hash) + ACCOUNT_CONNECTORS_FIELD_NUMBER; + hash = (53 * hash) + getAccountConnectorsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse 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.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + 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.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + java.io.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.developerconnect.v1.ListAccountConnectorsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + parseDelimitedFrom( + java.io.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.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListAccountConnectorsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing AccountConnectors
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListAccountConnectorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListAccountConnectorsResponse) + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.class, + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (accountConnectorsBuilder_ == null) { + accountConnectors_ = java.util.Collections.emptyList(); + } else { + accountConnectors_ = null; + accountConnectorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListAccountConnectorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse build() { + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse buildPartial() { + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse result = + new com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse result) { + if (accountConnectorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accountConnectors_ = java.util.Collections.unmodifiableList(accountConnectors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accountConnectors_ = accountConnectors_; + } else { + result.accountConnectors_ = accountConnectorsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListAccountConnectorsResponse) { + return mergeFrom( + (com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse other) { + if (other + == com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + .getDefaultInstance()) return this; + if (accountConnectorsBuilder_ == null) { + if (!other.accountConnectors_.isEmpty()) { + if (accountConnectors_.isEmpty()) { + accountConnectors_ = other.accountConnectors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccountConnectorsIsMutable(); + accountConnectors_.addAll(other.accountConnectors_); + } + onChanged(); + } + } else { + if (!other.accountConnectors_.isEmpty()) { + if (accountConnectorsBuilder_.isEmpty()) { + accountConnectorsBuilder_.dispose(); + accountConnectorsBuilder_ = null; + accountConnectors_ = other.accountConnectors_; + bitField0_ = (bitField0_ & ~0x00000001); + accountConnectorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccountConnectorsFieldBuilder() + : null; + } else { + accountConnectorsBuilder_.addAllMessages(other.accountConnectors_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.developerconnect.v1.AccountConnector m = + input.readMessage( + com.google.cloud.developerconnect.v1.AccountConnector.parser(), + extensionRegistry); + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + accountConnectors_.add(m); + } else { + accountConnectorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + accountConnectors_ = java.util.Collections.emptyList(); + + private void ensureAccountConnectorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accountConnectors_ = + new java.util.ArrayList( + accountConnectors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + accountConnectorsBuilder_; + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public java.util.List + getAccountConnectorsList() { + if (accountConnectorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accountConnectors_); + } else { + return accountConnectorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public int getAccountConnectorsCount() { + if (accountConnectorsBuilder_ == null) { + return accountConnectors_.size(); + } else { + return accountConnectorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnectors(int index) { + if (accountConnectorsBuilder_ == null) { + return accountConnectors_.get(index); + } else { + return accountConnectorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder setAccountConnectors( + int index, com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountConnectorsIsMutable(); + accountConnectors_.set(index, value); + onChanged(); + } else { + accountConnectorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder setAccountConnectors( + int index, com.google.cloud.developerconnect.v1.AccountConnector.Builder builderForValue) { + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + accountConnectors_.set(index, builderForValue.build()); + onChanged(); + } else { + accountConnectorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder addAccountConnectors( + com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountConnectorsIsMutable(); + accountConnectors_.add(value); + onChanged(); + } else { + accountConnectorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder addAccountConnectors( + int index, com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountConnectorsIsMutable(); + accountConnectors_.add(index, value); + onChanged(); + } else { + accountConnectorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder addAccountConnectors( + com.google.cloud.developerconnect.v1.AccountConnector.Builder builderForValue) { + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + accountConnectors_.add(builderForValue.build()); + onChanged(); + } else { + accountConnectorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder addAccountConnectors( + int index, com.google.cloud.developerconnect.v1.AccountConnector.Builder builderForValue) { + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + accountConnectors_.add(index, builderForValue.build()); + onChanged(); + } else { + accountConnectorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder addAllAccountConnectors( + java.lang.Iterable + values) { + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accountConnectors_); + onChanged(); + } else { + accountConnectorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder clearAccountConnectors() { + if (accountConnectorsBuilder_ == null) { + accountConnectors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accountConnectorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public Builder removeAccountConnectors(int index) { + if (accountConnectorsBuilder_ == null) { + ensureAccountConnectorsIsMutable(); + accountConnectors_.remove(index); + onChanged(); + } else { + accountConnectorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector.Builder + getAccountConnectorsBuilder(int index) { + return getAccountConnectorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorsOrBuilder(int index) { + if (accountConnectorsBuilder_ == null) { + return accountConnectors_.get(index); + } else { + return accountConnectorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public java.util.List + getAccountConnectorsOrBuilderList() { + if (accountConnectorsBuilder_ != null) { + return accountConnectorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accountConnectors_); + } + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector.Builder + addAccountConnectorsBuilder() { + return getAccountConnectorsFieldBuilder() + .addBuilder(com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector.Builder + addAccountConnectorsBuilder(int index) { + return getAccountConnectorsFieldBuilder() + .addBuilder( + index, com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of AccountConnectors
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + public java.util.List + getAccountConnectorsBuilderList() { + return getAccountConnectorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + getAccountConnectorsFieldBuilder() { + if (accountConnectorsBuilder_ == null) { + accountConnectorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder>( + accountConnectors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accountConnectors_ = null; + } + return accountConnectorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.developerconnect.v1.ListAccountConnectorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListAccountConnectorsResponse) + private static final com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse(); + } + + public static com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountConnectorsResponse 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.developerconnect.v1.ListAccountConnectorsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponseOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponseOrBuilder.java new file mode 100644 index 000000000000..ad5e8398575f --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListAccountConnectorsResponseOrBuilder.java @@ -0,0 +1,168 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListAccountConnectorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListAccountConnectorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + java.util.List getAccountConnectorsList(); + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + com.google.cloud.developerconnect.v1.AccountConnector getAccountConnectors(int index); + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + int getAccountConnectorsCount(); + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + java.util.List + getAccountConnectorsOrBuilderList(); + + /** + * + * + *
+   * The list of AccountConnectors
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.AccountConnector account_connectors = 1; + * + */ + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder getAccountConnectorsOrBuilder( + int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequest.java new file mode 100644 index 000000000000..5577db9df5ad --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequest.java @@ -0,0 +1,1345 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Request for requesting list of InsightsConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListInsightsConfigsRequest} + */ +public final class ListInsightsConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListInsightsConfigsRequest) + ListInsightsConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInsightsConfigsRequest.newBuilder() to construct. + private ListInsightsConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInsightsConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInsightsConfigsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.class, + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListInsightsConfigsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListInsightsConfigsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results. See https://google.aip.dev/160 for more
+   * details. Filter string, adhering to the rules in
+   * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+   * If filter is empty, all InsightsConfigs are listed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results. See https://google.aip.dev/160 for more
+   * details. Filter string, adhering to the rules in
+   * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+   * If filter is empty, all InsightsConfigs are listed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.developerconnect.v1.ListInsightsConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest other = + (com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest 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.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + 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.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + java.io.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.developerconnect.v1.ListInsightsConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListInsightsConfigsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for requesting list of InsightsConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListInsightsConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListInsightsConfigsRequest) + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.class, + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest build() { + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest buildPartial() { + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest result = + new com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListInsightsConfigsRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest other) { + if (other + == com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListInsightsConfigsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListInsightsConfigsRequest.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListInsightsConfigsRequest.
+     * 
+ * + * + * 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. Parent value for ListInsightsConfigsRequest.
+     * 
+ * + * + * 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. Parent value for ListInsightsConfigsRequest.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results. See https://google.aip.dev/160 for more
+     * details. Filter string, adhering to the rules in
+     * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+     * If filter is empty, all InsightsConfigs are listed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See https://google.aip.dev/160 for more
+     * details. Filter string, adhering to the rules in
+     * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+     * If filter is empty, all InsightsConfigs are listed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results. See https://google.aip.dev/160 for more
+     * details. Filter string, adhering to the rules in
+     * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+     * If filter is empty, all InsightsConfigs are listed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See https://google.aip.dev/160 for more
+     * details. Filter string, adhering to the rules in
+     * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+     * If filter is empty, all InsightsConfigs are listed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results. See https://google.aip.dev/160 for more
+     * details. Filter string, adhering to the rules in
+     * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+     * If filter is empty, all InsightsConfigs are listed.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.ListInsightsConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListInsightsConfigsRequest) + private static final com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest(); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInsightsConfigsRequest 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.developerconnect.v1.ListInsightsConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..af27fb04758c --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListInsightsConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListInsightsConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListInsightsConfigsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListInsightsConfigsRequest.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results. See https://google.aip.dev/160 for more
+   * details. Filter string, adhering to the rules in
+   * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+   * If filter is empty, all InsightsConfigs are listed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results. See https://google.aip.dev/160 for more
+   * details. Filter string, adhering to the rules in
+   * https://google.aip.dev/160. List only InsightsConfigs matching the filter.
+   * If filter is empty, all InsightsConfigs are listed.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponse.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponse.java new file mode 100644 index 000000000000..aeba3d9a3d74 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponse.java @@ -0,0 +1,1463 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Request for response to listing InsightsConfigs.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListInsightsConfigsResponse} + */ +public final class ListInsightsConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListInsightsConfigsResponse) + ListInsightsConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListInsightsConfigsResponse.newBuilder() to construct. + private ListInsightsConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInsightsConfigsResponse() { + insightsConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListInsightsConfigsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.class, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.Builder.class); + } + + public static final int INSIGHTS_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List insightsConfigs_; + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + @java.lang.Override + public java.util.List + getInsightsConfigsList() { + return insightsConfigs_; + } + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + @java.lang.Override + public java.util.List + getInsightsConfigsOrBuilderList() { + return insightsConfigs_; + } + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + @java.lang.Override + public int getInsightsConfigsCount() { + return insightsConfigs_.size(); + } + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfigs(int index) { + return insightsConfigs_.get(index); + } + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigsOrBuilder( + int index) { + return insightsConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < insightsConfigs_.size(); i++) { + output.writeMessage(1, insightsConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < insightsConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, insightsConfigs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.developerconnect.v1.ListInsightsConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse other = + (com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse) obj; + + if (!getInsightsConfigsList().equals(other.getInsightsConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getInsightsConfigsCount() > 0) { + hash = (37 * hash) + INSIGHTS_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getInsightsConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse 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.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + 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.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + java.io.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.developerconnect.v1.ListInsightsConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseDelimitedFrom( + java.io.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.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListInsightsConfigsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for response to listing InsightsConfigs.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListInsightsConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListInsightsConfigsResponse) + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.class, + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (insightsConfigsBuilder_ == null) { + insightsConfigs_ = java.util.Collections.emptyList(); + } else { + insightsConfigs_ = null; + insightsConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_ListInsightsConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse build() { + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse buildPartial() { + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse result = + new com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse result) { + if (insightsConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + insightsConfigs_ = java.util.Collections.unmodifiableList(insightsConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.insightsConfigs_ = insightsConfigs_; + } else { + result.insightsConfigs_ = insightsConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListInsightsConfigsResponse) { + return mergeFrom((com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse other) { + if (other + == com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse.getDefaultInstance()) + return this; + if (insightsConfigsBuilder_ == null) { + if (!other.insightsConfigs_.isEmpty()) { + if (insightsConfigs_.isEmpty()) { + insightsConfigs_ = other.insightsConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.addAll(other.insightsConfigs_); + } + onChanged(); + } + } else { + if (!other.insightsConfigs_.isEmpty()) { + if (insightsConfigsBuilder_.isEmpty()) { + insightsConfigsBuilder_.dispose(); + insightsConfigsBuilder_ = null; + insightsConfigs_ = other.insightsConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + insightsConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInsightsConfigsFieldBuilder() + : null; + } else { + insightsConfigsBuilder_.addAllMessages(other.insightsConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.developerconnect.v1.InsightsConfig m = + input.readMessage( + com.google.cloud.developerconnect.v1.InsightsConfig.parser(), + extensionRegistry); + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.add(m); + } else { + insightsConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List insightsConfigs_ = + java.util.Collections.emptyList(); + + private void ensureInsightsConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + insightsConfigs_ = + new java.util.ArrayList( + insightsConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + insightsConfigsBuilder_; + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public java.util.List + getInsightsConfigsList() { + if (insightsConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(insightsConfigs_); + } else { + return insightsConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public int getInsightsConfigsCount() { + if (insightsConfigsBuilder_ == null) { + return insightsConfigs_.size(); + } else { + return insightsConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfigs(int index) { + if (insightsConfigsBuilder_ == null) { + return insightsConfigs_.get(index); + } else { + return insightsConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder setInsightsConfigs( + int index, com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsConfigsIsMutable(); + insightsConfigs_.set(index, value); + onChanged(); + } else { + insightsConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder setInsightsConfigs( + int index, com.google.cloud.developerconnect.v1.InsightsConfig.Builder builderForValue) { + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + insightsConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder addInsightsConfigs(com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsConfigsIsMutable(); + insightsConfigs_.add(value); + onChanged(); + } else { + insightsConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder addInsightsConfigs( + int index, com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInsightsConfigsIsMutable(); + insightsConfigs_.add(index, value); + onChanged(); + } else { + insightsConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder addInsightsConfigs( + com.google.cloud.developerconnect.v1.InsightsConfig.Builder builderForValue) { + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.add(builderForValue.build()); + onChanged(); + } else { + insightsConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder addInsightsConfigs( + int index, com.google.cloud.developerconnect.v1.InsightsConfig.Builder builderForValue) { + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + insightsConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder addAllInsightsConfigs( + java.lang.Iterable values) { + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, insightsConfigs_); + onChanged(); + } else { + insightsConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder clearInsightsConfigs() { + if (insightsConfigsBuilder_ == null) { + insightsConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + insightsConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public Builder removeInsightsConfigs(int index) { + if (insightsConfigsBuilder_ == null) { + ensureInsightsConfigsIsMutable(); + insightsConfigs_.remove(index); + onChanged(); + } else { + insightsConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public com.google.cloud.developerconnect.v1.InsightsConfig.Builder getInsightsConfigsBuilder( + int index) { + return getInsightsConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigsOrBuilder( + int index) { + if (insightsConfigsBuilder_ == null) { + return insightsConfigs_.get(index); + } else { + return insightsConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public java.util.List + getInsightsConfigsOrBuilderList() { + if (insightsConfigsBuilder_ != null) { + return insightsConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(insightsConfigs_); + } + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public com.google.cloud.developerconnect.v1.InsightsConfig.Builder addInsightsConfigsBuilder() { + return getInsightsConfigsFieldBuilder() + .addBuilder(com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public com.google.cloud.developerconnect.v1.InsightsConfig.Builder addInsightsConfigsBuilder( + int index) { + return getInsightsConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of InsightsConfigs.
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + public java.util.List + getInsightsConfigsBuilderList() { + return getInsightsConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + getInsightsConfigsFieldBuilder() { + if (insightsConfigsBuilder_ == null) { + insightsConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder>( + insightsConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + insightsConfigs_ = null; + } + return insightsConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.developerconnect.v1.ListInsightsConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListInsightsConfigsResponse) + private static final com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse(); + } + + public static com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInsightsConfigsResponse 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.developerconnect.v1.ListInsightsConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponseOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..b9a3f9724999 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListInsightsConfigsResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListInsightsConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListInsightsConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + java.util.List getInsightsConfigsList(); + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfigs(int index); + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + int getInsightsConfigsCount(); + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + java.util.List + getInsightsConfigsOrBuilderList(); + + /** + * + * + *
+   * The list of InsightsConfigs.
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.InsightsConfig insights_configs = 1; + */ + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigsOrBuilder( + int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequest.java new file mode 100644 index 000000000000..42cb00877f3c --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequest.java @@ -0,0 +1,1317 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for requesting a list of Users
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListUsersRequest} + */ +public final class ListUsersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListUsersRequest) + ListUsersRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListUsersRequest.newBuilder() to construct. + private ListUsersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListUsersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListUsersRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListUsersRequest.class, + com.google.cloud.developerconnect.v1.ListUsersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.developerconnect.v1.ListUsersRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListUsersRequest other = + (com.google.cloud.developerconnect.v1.ListUsersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest 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.developerconnect.v1.ListUsersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + 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.developerconnect.v1.ListUsersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + java.io.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.developerconnect.v1.ListUsersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.ListUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListUsersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting a list of Users
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListUsersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListUsersRequest) + com.google.cloud.developerconnect.v1.ListUsersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListUsersRequest.class, + com.google.cloud.developerconnect.v1.ListUsersRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ListUsersRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersRequest getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListUsersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersRequest build() { + com.google.cloud.developerconnect.v1.ListUsersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersRequest buildPartial() { + com.google.cloud.developerconnect.v1.ListUsersRequest result = + new com.google.cloud.developerconnect.v1.ListUsersRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.ListUsersRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListUsersRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.ListUsersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.ListUsersRequest other) { + if (other == com.google.cloud.developerconnect.v1.ListUsersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Parent value for ListUsersRequest
+     * 
+ * + * + * 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. Parent value for ListUsersRequest
+     * 
+ * + * + * 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. Parent value for ListUsersRequest
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer items than
+     * requested. If unspecified, server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results the server should return.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint for how to order the results
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.ListUsersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListUsersRequest) + private static final com.google.cloud.developerconnect.v1.ListUsersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListUsersRequest(); + } + + public static com.google.cloud.developerconnect.v1.ListUsersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUsersRequest 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.developerconnect.v1.ListUsersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequestOrBuilder.java new file mode 100644 index 000000000000..17b3102b57b2 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersRequestOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListUsersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListUsersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. Parent value for ListUsersRequest
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer items than
+   * requested. If unspecified, server will pick an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results the server should return.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint for how to order the results
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponse.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponse.java new file mode 100644 index 000000000000..0d812e392ec8 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponse.java @@ -0,0 +1,1439 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for response to listing Users
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListUsersResponse} + */ +public final class ListUsersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ListUsersResponse) + ListUsersResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListUsersResponse.newBuilder() to construct. + private ListUsersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListUsersResponse() { + users_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListUsersResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListUsersResponse.class, + com.google.cloud.developerconnect.v1.ListUsersResponse.Builder.class); + } + + public static final int USERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List users_; + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + @java.lang.Override + public java.util.List getUsersList() { + return users_; + } + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + @java.lang.Override + public java.util.List + getUsersOrBuilderList() { + return users_; + } + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + @java.lang.Override + public int getUsersCount() { + return users_.size(); + } + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.User getUsers(int index) { + return users_.get(index); + } + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.UserOrBuilder getUsersOrBuilder(int index) { + return users_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < users_.size(); i++) { + output.writeMessage(1, users_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < users_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, users_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.developerconnect.v1.ListUsersResponse)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ListUsersResponse other = + (com.google.cloud.developerconnect.v1.ListUsersResponse) obj; + + if (!getUsersList().equals(other.getUsersList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getUsersCount() > 0) { + hash = (37 * hash) + USERS_FIELD_NUMBER; + hash = (53 * hash) + getUsersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse 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.developerconnect.v1.ListUsersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + 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.developerconnect.v1.ListUsersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + java.io.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.developerconnect.v1.ListUsersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseDelimitedFrom( + java.io.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.developerconnect.v1.ListUsersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ListUsersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing Users
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ListUsersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ListUsersResponse) + com.google.cloud.developerconnect.v1.ListUsersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ListUsersResponse.class, + com.google.cloud.developerconnect.v1.ListUsersResponse.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ListUsersResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + } else { + users_ = null; + usersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ListUsersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersResponse getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ListUsersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersResponse build() { + com.google.cloud.developerconnect.v1.ListUsersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ListUsersResponse buildPartial() { + com.google.cloud.developerconnect.v1.ListUsersResponse result = + new com.google.cloud.developerconnect.v1.ListUsersResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.developerconnect.v1.ListUsersResponse result) { + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + users_ = java.util.Collections.unmodifiableList(users_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.users_ = users_; + } else { + result.users_ = usersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.ListUsersResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ListUsersResponse) { + return mergeFrom((com.google.cloud.developerconnect.v1.ListUsersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.ListUsersResponse other) { + if (other == com.google.cloud.developerconnect.v1.ListUsersResponse.getDefaultInstance()) + return this; + if (usersBuilder_ == null) { + if (!other.users_.isEmpty()) { + if (users_.isEmpty()) { + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsersIsMutable(); + users_.addAll(other.users_); + } + onChanged(); + } + } else { + if (!other.users_.isEmpty()) { + if (usersBuilder_.isEmpty()) { + usersBuilder_.dispose(); + usersBuilder_ = null; + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + usersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUsersFieldBuilder() + : null; + } else { + usersBuilder_.addAllMessages(other.users_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.developerconnect.v1.User m = + input.readMessage( + com.google.cloud.developerconnect.v1.User.parser(), extensionRegistry); + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(m); + } else { + usersBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List users_ = + java.util.Collections.emptyList(); + + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + users_ = new java.util.ArrayList(users_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.User, + com.google.cloud.developerconnect.v1.User.Builder, + com.google.cloud.developerconnect.v1.UserOrBuilder> + usersBuilder_; + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public java.util.List getUsersList() { + if (usersBuilder_ == null) { + return java.util.Collections.unmodifiableList(users_); + } else { + return usersBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public int getUsersCount() { + if (usersBuilder_ == null) { + return users_.size(); + } else { + return usersBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public com.google.cloud.developerconnect.v1.User getUsers(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder setUsers(int index, com.google.cloud.developerconnect.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.set(index, value); + onChanged(); + } else { + usersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder setUsers( + int index, com.google.cloud.developerconnect.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.set(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder addUsers(com.google.cloud.developerconnect.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(value); + onChanged(); + } else { + usersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder addUsers(int index, com.google.cloud.developerconnect.v1.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(index, value); + onChanged(); + } else { + usersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder addUsers(com.google.cloud.developerconnect.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder addUsers( + int index, com.google.cloud.developerconnect.v1.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder addAllUsers( + java.lang.Iterable values) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, users_); + onChanged(); + } else { + usersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder clearUsers() { + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + usersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public Builder removeUsers(int index) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.remove(index); + onChanged(); + } else { + usersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public com.google.cloud.developerconnect.v1.User.Builder getUsersBuilder(int index) { + return getUsersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public com.google.cloud.developerconnect.v1.UserOrBuilder getUsersOrBuilder(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public java.util.List + getUsersOrBuilderList() { + if (usersBuilder_ != null) { + return usersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(users_); + } + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public com.google.cloud.developerconnect.v1.User.Builder addUsersBuilder() { + return getUsersFieldBuilder() + .addBuilder(com.google.cloud.developerconnect.v1.User.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public com.google.cloud.developerconnect.v1.User.Builder addUsersBuilder(int index) { + return getUsersFieldBuilder() + .addBuilder(index, com.google.cloud.developerconnect.v1.User.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of Users
+     * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + public java.util.List getUsersBuilderList() { + return getUsersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.User, + com.google.cloud.developerconnect.v1.User.Builder, + com.google.cloud.developerconnect.v1.UserOrBuilder> + getUsersFieldBuilder() { + if (usersBuilder_ == null) { + usersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.developerconnect.v1.User, + com.google.cloud.developerconnect.v1.User.Builder, + com.google.cloud.developerconnect.v1.UserOrBuilder>( + users_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + users_ = null; + } + return usersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results the server should return.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.developerconnect.v1.ListUsersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ListUsersResponse) + private static final com.google.cloud.developerconnect.v1.ListUsersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ListUsersResponse(); + } + + public static com.google.cloud.developerconnect.v1.ListUsersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUsersResponse 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.developerconnect.v1.ListUsersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponseOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponseOrBuilder.java new file mode 100644 index 000000000000..88fa84b5bf71 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ListUsersResponseOrBuilder.java @@ -0,0 +1,162 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ListUsersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ListUsersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + java.util.List getUsersList(); + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + com.google.cloud.developerconnect.v1.User getUsers(int index); + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + int getUsersCount(); + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + java.util.List + getUsersOrBuilderList(); + + /** + * + * + *
+   * The list of Users
+   * 
+ * + * repeated .google.cloud.developerconnect.v1.User users = 1; + */ + com.google.cloud.developerconnect.v1.UserOrBuilder getUsersOrBuilder(int index); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results the server should return.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfig.java new file mode 100644 index 000000000000..dadc840e8316 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfig.java @@ -0,0 +1,1070 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * ProviderOAuthConfig is the OAuth config for a provider.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ProviderOAuthConfig} + */ +public final class ProviderOAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.ProviderOAuthConfig) + ProviderOAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ProviderOAuthConfig.newBuilder() to construct. + private ProviderOAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProviderOAuthConfig() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProviderOAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.class, + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder.class); + } + + private int oauthProviderIdCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object oauthProviderId_; + + public enum OauthProviderIdCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SYSTEM_PROVIDER_ID(1), + OAUTHPROVIDERID_NOT_SET(0); + private final int value; + + private OauthProviderIdCase(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 OauthProviderIdCase valueOf(int value) { + return forNumber(value); + } + + public static OauthProviderIdCase forNumber(int value) { + switch (value) { + case 1: + return SYSTEM_PROVIDER_ID; + case 0: + return OAUTHPROVIDERID_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OauthProviderIdCase getOauthProviderIdCase() { + return OauthProviderIdCase.forNumber(oauthProviderIdCase_); + } + + public static final int SYSTEM_PROVIDER_ID_FIELD_NUMBER = 1; + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the systemProviderId field is set. + */ + public boolean hasSystemProviderId() { + return oauthProviderIdCase_ == 1; + } + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for systemProviderId. + */ + public int getSystemProviderIdValue() { + if (oauthProviderIdCase_ == 1) { + return (java.lang.Integer) oauthProviderId_; + } + return 0; + } + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The systemProviderId. + */ + public com.google.cloud.developerconnect.v1.SystemProvider getSystemProviderId() { + if (oauthProviderIdCase_ == 1) { + com.google.cloud.developerconnect.v1.SystemProvider result = + com.google.cloud.developerconnect.v1.SystemProvider.forNumber( + (java.lang.Integer) oauthProviderId_); + return result == null + ? com.google.cloud.developerconnect.v1.SystemProvider.UNRECOGNIZED + : result; + } + return com.google.cloud.developerconnect.v1.SystemProvider.SYSTEM_PROVIDER_UNSPECIFIED; + } + + public static final int SCOPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + return scopes_; + } + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oauthProviderIdCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) oauthProviderId_)); + } + for (int i = 0; i < scopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scopes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oauthProviderIdCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) oauthProviderId_)); + } + { + int dataSize = 0; + for (int i = 0; i < scopes_.size(); i++) { + dataSize += computeStringSizeNoTag(scopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getScopesList().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.developerconnect.v1.ProviderOAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.ProviderOAuthConfig other = + (com.google.cloud.developerconnect.v1.ProviderOAuthConfig) obj; + + if (!getScopesList().equals(other.getScopesList())) return false; + if (!getOauthProviderIdCase().equals(other.getOauthProviderIdCase())) return false; + switch (oauthProviderIdCase_) { + case 1: + if (getSystemProviderIdValue() != other.getSystemProviderIdValue()) 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(); + if (getScopesCount() > 0) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getScopesList().hashCode(); + } + switch (oauthProviderIdCase_) { + case 1: + hash = (37 * hash) + SYSTEM_PROVIDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getSystemProviderIdValue(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig 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.developerconnect.v1.ProviderOAuthConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + 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.developerconnect.v1.ProviderOAuthConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + java.io.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.developerconnect.v1.ProviderOAuthConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.ProviderOAuthConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.ProviderOAuthConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * ProviderOAuthConfig is the OAuth config for a provider.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.ProviderOAuthConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.ProviderOAuthConfig) + com.google.cloud.developerconnect.v1.ProviderOAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.class, + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.ProviderOAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + oauthProviderIdCase_ = 0; + oauthProviderId_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_ProviderOAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig build() { + com.google.cloud.developerconnect.v1.ProviderOAuthConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.ProviderOAuthConfig buildPartial() { + com.google.cloud.developerconnect.v1.ProviderOAuthConfig result = + new com.google.cloud.developerconnect.v1.ProviderOAuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.ProviderOAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + scopes_.makeImmutable(); + result.scopes_ = scopes_; + } + } + + private void buildPartialOneofs( + com.google.cloud.developerconnect.v1.ProviderOAuthConfig result) { + result.oauthProviderIdCase_ = oauthProviderIdCase_; + result.oauthProviderId_ = this.oauthProviderId_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.developerconnect.v1.ProviderOAuthConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.ProviderOAuthConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.ProviderOAuthConfig other) { + if (other == com.google.cloud.developerconnect.v1.ProviderOAuthConfig.getDefaultInstance()) + return this; + if (!other.scopes_.isEmpty()) { + if (scopes_.isEmpty()) { + scopes_ = other.scopes_; + bitField0_ |= 0x00000002; + } else { + ensureScopesIsMutable(); + scopes_.addAll(other.scopes_); + } + onChanged(); + } + switch (other.getOauthProviderIdCase()) { + case SYSTEM_PROVIDER_ID: + { + setSystemProviderIdValue(other.getSystemProviderIdValue()); + break; + } + case OAUTHPROVIDERID_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: + { + int rawValue = input.readEnum(); + oauthProviderIdCase_ = 1; + oauthProviderId_ = rawValue; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + 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 oauthProviderIdCase_ = 0; + private java.lang.Object oauthProviderId_; + + public OauthProviderIdCase getOauthProviderIdCase() { + return OauthProviderIdCase.forNumber(oauthProviderIdCase_); + } + + public Builder clearOauthProviderId() { + oauthProviderIdCase_ = 0; + oauthProviderId_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the systemProviderId field is set. + */ + @java.lang.Override + public boolean hasSystemProviderId() { + return oauthProviderIdCase_ == 1; + } + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for systemProviderId. + */ + @java.lang.Override + public int getSystemProviderIdValue() { + if (oauthProviderIdCase_ == 1) { + return ((java.lang.Integer) oauthProviderId_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for systemProviderId to set. + * @return This builder for chaining. + */ + public Builder setSystemProviderIdValue(int value) { + oauthProviderIdCase_ = 1; + oauthProviderId_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The systemProviderId. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.SystemProvider getSystemProviderId() { + if (oauthProviderIdCase_ == 1) { + com.google.cloud.developerconnect.v1.SystemProvider result = + com.google.cloud.developerconnect.v1.SystemProvider.forNumber( + (java.lang.Integer) oauthProviderId_); + return result == null + ? com.google.cloud.developerconnect.v1.SystemProvider.UNRECOGNIZED + : result; + } + return com.google.cloud.developerconnect.v1.SystemProvider.SYSTEM_PROVIDER_UNSPECIFIED; + } + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The systemProviderId to set. + * @return This builder for chaining. + */ + public Builder setSystemProviderId(com.google.cloud.developerconnect.v1.SystemProvider value) { + if (value == null) { + throw new NullPointerException(); + } + oauthProviderIdCase_ = 1; + oauthProviderId_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. Developer Connect provided OAuth.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearSystemProviderId() { + if (oauthProviderIdCase_ == 1) { + oauthProviderIdCase_ = 0; + oauthProviderId_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.LazyStringArrayList scopes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureScopesIsMutable() { + if (!scopes_.isModifiable()) { + scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + public com.google.protobuf.ProtocolStringList getScopesList() { + scopes_.makeImmutable(); + return scopes_; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + public int getScopesCount() { + return scopes_.size(); + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + public java.lang.String getScopes(int index) { + return scopes_.get(index); + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + public com.google.protobuf.ByteString getScopesBytes(int index) { + return scopes_.getByteString(index); + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The scopes to set. + * @return This builder for chaining. + */ + public Builder setScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The scopes to add. + * @return This builder for chaining. + */ + public Builder addScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureScopesIsMutable(); + scopes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The scopes to add. + * @return This builder for chaining. + */ + public Builder addAllScopes(java.lang.Iterable values) { + ensureScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, scopes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScopes() { + scopes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User selected scopes to apply to the Oauth config
+     * In the event of changing scopes, user records under AccountConnector will
+     * be deleted and users will re-auth again.
+     * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the scopes to add. + * @return This builder for chaining. + */ + public Builder addScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureScopesIsMutable(); + scopes_.add(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.developerconnect.v1.ProviderOAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.ProviderOAuthConfig) + private static final com.google.cloud.developerconnect.v1.ProviderOAuthConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.ProviderOAuthConfig(); + } + + public static com.google.cloud.developerconnect.v1.ProviderOAuthConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProviderOAuthConfig 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.developerconnect.v1.ProviderOAuthConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfigOrBuilder.java new file mode 100644 index 000000000000..7ff34d19f14c --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/ProviderOAuthConfigOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface ProviderOAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.ProviderOAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the systemProviderId field is set. + */ + boolean hasSystemProviderId(); + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for systemProviderId. + */ + int getSystemProviderIdValue(); + + /** + * + * + *
+   * Immutable. Developer Connect provided OAuth.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.SystemProvider system_provider_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The systemProviderId. + */ + com.google.cloud.developerconnect.v1.SystemProvider getSystemProviderId(); + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the scopes. + */ + java.util.List getScopesList(); + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of scopes. + */ + int getScopesCount(); + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The scopes at the given index. + */ + java.lang.String getScopes(int index); + + /** + * + * + *
+   * Required. User selected scopes to apply to the Oauth config
+   * In the event of changing scopes, user records under AccountConnector will
+   * be deleted and users will re-auth again.
+   * 
+ * + * repeated string scopes = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the scopes at the given index. + */ + com.google.protobuf.ByteString getScopesBytes(int index); + + com.google.cloud.developerconnect.v1.ProviderOAuthConfig.OauthProviderIdCase + getOauthProviderIdCase(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfig.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfig.java new file mode 100644 index 000000000000..5b986c3161d3 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfig.java @@ -0,0 +1,1823 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * RuntimeConfig represents the runtimes where the application is
+ * deployed.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.RuntimeConfig} + */ +public final class RuntimeConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.RuntimeConfig) + RuntimeConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use RuntimeConfig.newBuilder() to construct. + private RuntimeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RuntimeConfig() { + uri_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RuntimeConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_RuntimeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.RuntimeConfig.class, + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder.class); + } + + /** + * + * + *
+   * The state of the runtime in the InsightsConfig.
+   * Whether the runtime is linked to the InsightsConfig.
+   * 
+ * + * Protobuf enum {@code google.cloud.developerconnect.v1.RuntimeConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No state specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The runtime configuration has been linked to the InsightsConfig.
+     * 
+ * + * LINKED = 1; + */ + LINKED(1), + /** + * + * + *
+     * The runtime configuration has been unlinked to the InsightsConfig.
+     * 
+ * + * UNLINKED = 2; + */ + UNLINKED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No state specified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The runtime configuration has been linked to the InsightsConfig.
+     * 
+ * + * LINKED = 1; + */ + public static final int LINKED_VALUE = 1; + + /** + * + * + *
+     * The runtime configuration has been unlinked to the InsightsConfig.
+     * 
+ * + * UNLINKED = 2; + */ + public static final int UNLINKED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return LINKED; + case 2: + return UNLINKED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.RuntimeConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.developerconnect.v1.RuntimeConfig.State) + } + + private int runtimeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object runtime_; + + public enum RuntimeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GKE_WORKLOAD(3), + RUNTIME_NOT_SET(0); + private final int value; + + private RuntimeCase(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 RuntimeCase valueOf(int value) { + return forNumber(value); + } + + public static RuntimeCase forNumber(int value) { + switch (value) { + case 3: + return GKE_WORKLOAD; + case 0: + return RUNTIME_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RuntimeCase getRuntimeCase() { + return RuntimeCase.forNumber(runtimeCase_); + } + + private int derivedFromCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object derivedFrom_; + + public enum DerivedFromCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + APP_HUB_WORKLOAD(4), + DERIVEDFROM_NOT_SET(0); + private final int value; + + private DerivedFromCase(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 DerivedFromCase valueOf(int value) { + return forNumber(value); + } + + public static DerivedFromCase forNumber(int value) { + switch (value) { + case 4: + return APP_HUB_WORKLOAD; + case 0: + return DERIVEDFROM_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DerivedFromCase getDerivedFromCase() { + return DerivedFromCase.forNumber(derivedFromCase_); + } + + public static final int GKE_WORKLOAD_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gkeWorkload field is set. + */ + @java.lang.Override + public boolean hasGkeWorkload() { + return runtimeCase_ == 3; + } + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gkeWorkload. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkload getGkeWorkload() { + if (runtimeCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_; + } + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder getGkeWorkloadOrBuilder() { + if (runtimeCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_; + } + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + + public static final int APP_HUB_WORKLOAD_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the appHubWorkload field is set. + */ + @java.lang.Override + public boolean hasAppHubWorkload() { + return derivedFromCase_ == 4; + } + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The appHubWorkload. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkload getAppHubWorkload() { + if (derivedFromCase_ == 4) { + return (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_; + } + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder getAppHubWorkloadOrBuilder() { + if (derivedFromCase_ == 4) { + return (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_; + } + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
+   * Required. Immutable. The URI of the runtime configuration.
+   * For GKE, this is the cluster name.
+   * For Cloud Run, this is the service name.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the runtime configuration.
+   * For GKE, this is the cluster name.
+   * For Cloud Run, this is the service name.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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 STATE_FIELD_NUMBER = 2; + private int state_ = 0; + + /** + * + * + *
+   * Output only. The state of the Runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+   * Output only. The state of the Runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig.State getState() { + com.google.cloud.developerconnect.v1.RuntimeConfig.State result = + com.google.cloud.developerconnect.v1.RuntimeConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.developerconnect.v1.RuntimeConfig.State.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(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + if (state_ + != com.google.cloud.developerconnect.v1.RuntimeConfig.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (runtimeCase_ == 3) { + output.writeMessage(3, (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_); + } + if (derivedFromCase_ == 4) { + output.writeMessage(4, (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_); + } + 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 (state_ + != com.google.cloud.developerconnect.v1.RuntimeConfig.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (runtimeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_); + } + if (derivedFromCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_); + } + 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.developerconnect.v1.RuntimeConfig)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.RuntimeConfig other = + (com.google.cloud.developerconnect.v1.RuntimeConfig) obj; + + if (!getUri().equals(other.getUri())) return false; + if (state_ != other.state_) return false; + if (!getRuntimeCase().equals(other.getRuntimeCase())) return false; + switch (runtimeCase_) { + case 3: + if (!getGkeWorkload().equals(other.getGkeWorkload())) return false; + break; + case 0: + default: + } + if (!getDerivedFromCase().equals(other.getDerivedFromCase())) return false; + switch (derivedFromCase_) { + case 4: + if (!getAppHubWorkload().equals(other.getAppHubWorkload())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (runtimeCase_) { + case 3: + hash = (37 * hash) + GKE_WORKLOAD_FIELD_NUMBER; + hash = (53 * hash) + getGkeWorkload().hashCode(); + break; + case 0: + default: + } + switch (derivedFromCase_) { + case 4: + hash = (37 * hash) + APP_HUB_WORKLOAD_FIELD_NUMBER; + hash = (53 * hash) + getAppHubWorkload().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig 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.developerconnect.v1.RuntimeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + 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.developerconnect.v1.RuntimeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + java.io.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.developerconnect.v1.RuntimeConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseDelimitedFrom( + java.io.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.developerconnect.v1.RuntimeConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.RuntimeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * RuntimeConfig represents the runtimes where the application is
+   * deployed.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.RuntimeConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.RuntimeConfig) + com.google.cloud.developerconnect.v1.RuntimeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_RuntimeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.RuntimeConfig.class, + com.google.cloud.developerconnect.v1.RuntimeConfig.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.RuntimeConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (gkeWorkloadBuilder_ != null) { + gkeWorkloadBuilder_.clear(); + } + if (appHubWorkloadBuilder_ != null) { + appHubWorkloadBuilder_.clear(); + } + uri_ = ""; + state_ = 0; + runtimeCase_ = 0; + runtime_ = null; + derivedFromCase_ = 0; + derivedFrom_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_RuntimeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.RuntimeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig build() { + com.google.cloud.developerconnect.v1.RuntimeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig buildPartial() { + com.google.cloud.developerconnect.v1.RuntimeConfig result = + new com.google.cloud.developerconnect.v1.RuntimeConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.RuntimeConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + } + + private void buildPartialOneofs(com.google.cloud.developerconnect.v1.RuntimeConfig result) { + result.runtimeCase_ = runtimeCase_; + result.runtime_ = this.runtime_; + if (runtimeCase_ == 3 && gkeWorkloadBuilder_ != null) { + result.runtime_ = gkeWorkloadBuilder_.build(); + } + result.derivedFromCase_ = derivedFromCase_; + result.derivedFrom_ = this.derivedFrom_; + if (derivedFromCase_ == 4 && appHubWorkloadBuilder_ != null) { + result.derivedFrom_ = appHubWorkloadBuilder_.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.developerconnect.v1.RuntimeConfig) { + return mergeFrom((com.google.cloud.developerconnect.v1.RuntimeConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.RuntimeConfig other) { + if (other == com.google.cloud.developerconnect.v1.RuntimeConfig.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getRuntimeCase()) { + case GKE_WORKLOAD: + { + mergeGkeWorkload(other.getGkeWorkload()); + break; + } + case RUNTIME_NOT_SET: + { + break; + } + } + switch (other.getDerivedFromCase()) { + case APP_HUB_WORKLOAD: + { + mergeAppHubWorkload(other.getAppHubWorkload()); + break; + } + case DERIVEDFROM_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: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 16 + case 26: + { + input.readMessage(getGkeWorkloadFieldBuilder().getBuilder(), extensionRegistry); + runtimeCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getAppHubWorkloadFieldBuilder().getBuilder(), extensionRegistry); + derivedFromCase_ = 4; + 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 runtimeCase_ = 0; + private java.lang.Object runtime_; + + public RuntimeCase getRuntimeCase() { + return RuntimeCase.forNumber(runtimeCase_); + } + + public Builder clearRuntime() { + runtimeCase_ = 0; + runtime_ = null; + onChanged(); + return this; + } + + private int derivedFromCase_ = 0; + private java.lang.Object derivedFrom_; + + public DerivedFromCase getDerivedFromCase() { + return DerivedFromCase.forNumber(derivedFromCase_); + } + + public Builder clearDerivedFrom() { + derivedFromCase_ = 0; + derivedFrom_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GKEWorkload, + com.google.cloud.developerconnect.v1.GKEWorkload.Builder, + com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder> + gkeWorkloadBuilder_; + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gkeWorkload field is set. + */ + @java.lang.Override + public boolean hasGkeWorkload() { + return runtimeCase_ == 3; + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gkeWorkload. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkload getGkeWorkload() { + if (gkeWorkloadBuilder_ == null) { + if (runtimeCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_; + } + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } else { + if (runtimeCase_ == 3) { + return gkeWorkloadBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGkeWorkload(com.google.cloud.developerconnect.v1.GKEWorkload value) { + if (gkeWorkloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + runtime_ = value; + onChanged(); + } else { + gkeWorkloadBuilder_.setMessage(value); + } + runtimeCase_ = 3; + return this; + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setGkeWorkload( + com.google.cloud.developerconnect.v1.GKEWorkload.Builder builderForValue) { + if (gkeWorkloadBuilder_ == null) { + runtime_ = builderForValue.build(); + onChanged(); + } else { + gkeWorkloadBuilder_.setMessage(builderForValue.build()); + } + runtimeCase_ = 3; + return this; + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeGkeWorkload(com.google.cloud.developerconnect.v1.GKEWorkload value) { + if (gkeWorkloadBuilder_ == null) { + if (runtimeCase_ == 3 + && runtime_ != com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance()) { + runtime_ = + com.google.cloud.developerconnect.v1.GKEWorkload.newBuilder( + (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_) + .mergeFrom(value) + .buildPartial(); + } else { + runtime_ = value; + } + onChanged(); + } else { + if (runtimeCase_ == 3) { + gkeWorkloadBuilder_.mergeFrom(value); + } else { + gkeWorkloadBuilder_.setMessage(value); + } + } + runtimeCase_ = 3; + return this; + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearGkeWorkload() { + if (gkeWorkloadBuilder_ == null) { + if (runtimeCase_ == 3) { + runtimeCase_ = 0; + runtime_ = null; + onChanged(); + } + } else { + if (runtimeCase_ == 3) { + runtimeCase_ = 0; + runtime_ = null; + } + gkeWorkloadBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.GKEWorkload.Builder getGkeWorkloadBuilder() { + return getGkeWorkloadFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder getGkeWorkloadOrBuilder() { + if ((runtimeCase_ == 3) && (gkeWorkloadBuilder_ != null)) { + return gkeWorkloadBuilder_.getMessageOrBuilder(); + } else { + if (runtimeCase_ == 3) { + return (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_; + } + return com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. Google Kubernetes Engine runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GKEWorkload, + com.google.cloud.developerconnect.v1.GKEWorkload.Builder, + com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder> + getGkeWorkloadFieldBuilder() { + if (gkeWorkloadBuilder_ == null) { + if (!(runtimeCase_ == 3)) { + runtime_ = com.google.cloud.developerconnect.v1.GKEWorkload.getDefaultInstance(); + } + gkeWorkloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.GKEWorkload, + com.google.cloud.developerconnect.v1.GKEWorkload.Builder, + com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder>( + (com.google.cloud.developerconnect.v1.GKEWorkload) runtime_, + getParentForChildren(), + isClean()); + runtime_ = null; + } + runtimeCase_ = 3; + onChanged(); + return gkeWorkloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AppHubWorkload, + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder, + com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder> + appHubWorkloadBuilder_; + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the appHubWorkload field is set. + */ + @java.lang.Override + public boolean hasAppHubWorkload() { + return derivedFromCase_ == 4; + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The appHubWorkload. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkload getAppHubWorkload() { + if (appHubWorkloadBuilder_ == null) { + if (derivedFromCase_ == 4) { + return (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_; + } + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } else { + if (derivedFromCase_ == 4) { + return appHubWorkloadBuilder_.getMessage(); + } + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAppHubWorkload(com.google.cloud.developerconnect.v1.AppHubWorkload value) { + if (appHubWorkloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedFrom_ = value; + onChanged(); + } else { + appHubWorkloadBuilder_.setMessage(value); + } + derivedFromCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAppHubWorkload( + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder builderForValue) { + if (appHubWorkloadBuilder_ == null) { + derivedFrom_ = builderForValue.build(); + onChanged(); + } else { + appHubWorkloadBuilder_.setMessage(builderForValue.build()); + } + derivedFromCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAppHubWorkload(com.google.cloud.developerconnect.v1.AppHubWorkload value) { + if (appHubWorkloadBuilder_ == null) { + if (derivedFromCase_ == 4 + && derivedFrom_ + != com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance()) { + derivedFrom_ = + com.google.cloud.developerconnect.v1.AppHubWorkload.newBuilder( + (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_) + .mergeFrom(value) + .buildPartial(); + } else { + derivedFrom_ = value; + } + onChanged(); + } else { + if (derivedFromCase_ == 4) { + appHubWorkloadBuilder_.mergeFrom(value); + } else { + appHubWorkloadBuilder_.setMessage(value); + } + } + derivedFromCase_ = 4; + return this; + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAppHubWorkload() { + if (appHubWorkloadBuilder_ == null) { + if (derivedFromCase_ == 4) { + derivedFromCase_ = 0; + derivedFrom_ = null; + onChanged(); + } + } else { + if (derivedFromCase_ == 4) { + derivedFromCase_ = 0; + derivedFrom_ = null; + } + appHubWorkloadBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.developerconnect.v1.AppHubWorkload.Builder getAppHubWorkloadBuilder() { + return getAppHubWorkloadFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder + getAppHubWorkloadOrBuilder() { + if ((derivedFromCase_ == 4) && (appHubWorkloadBuilder_ != null)) { + return appHubWorkloadBuilder_.getMessageOrBuilder(); + } else { + if (derivedFromCase_ == 4) { + return (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_; + } + return com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Output only. App Hub Workload.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AppHubWorkload, + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder, + com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder> + getAppHubWorkloadFieldBuilder() { + if (appHubWorkloadBuilder_ == null) { + if (!(derivedFromCase_ == 4)) { + derivedFrom_ = com.google.cloud.developerconnect.v1.AppHubWorkload.getDefaultInstance(); + } + appHubWorkloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AppHubWorkload, + com.google.cloud.developerconnect.v1.AppHubWorkload.Builder, + com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder>( + (com.google.cloud.developerconnect.v1.AppHubWorkload) derivedFrom_, + getParentForChildren(), + isClean()); + derivedFrom_ = null; + } + derivedFromCase_ = 4; + onChanged(); + return appHubWorkloadBuilder_; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
+     * Required. Immutable. The URI of the runtime configuration.
+     * For GKE, this is the cluster name.
+     * For Cloud Run, this is the service name.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the runtime configuration.
+     * For GKE, this is the cluster name.
+     * For Cloud Run, this is the service name.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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. Immutable. The URI of the runtime configuration.
+     * For GKE, this is the cluster name.
+     * For Cloud Run, this is the service name.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The URI of the runtime configuration.
+     * For GKE, this is the cluster name.
+     * For Cloud Run, this is the service name.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Immutable. The URI of the runtime configuration.
+     * For GKE, this is the cluster name.
+     * For Cloud Run, this is the service name.
+     * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
+     * Output only. The state of the Runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
+     * Output only. The state of the Runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the Runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.RuntimeConfig.State getState() { + com.google.cloud.developerconnect.v1.RuntimeConfig.State result = + com.google.cloud.developerconnect.v1.RuntimeConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.developerconnect.v1.RuntimeConfig.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Output only. The state of the Runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.developerconnect.v1.RuntimeConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The state of the Runtime.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 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.developerconnect.v1.RuntimeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.RuntimeConfig) + private static final com.google.cloud.developerconnect.v1.RuntimeConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.RuntimeConfig(); + } + + public static com.google.cloud.developerconnect.v1.RuntimeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuntimeConfig 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.developerconnect.v1.RuntimeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfigOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfigOrBuilder.java new file mode 100644 index 000000000000..16d061af1687 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/RuntimeConfigOrBuilder.java @@ -0,0 +1,180 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface RuntimeConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.RuntimeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the gkeWorkload field is set. + */ + boolean hasGkeWorkload(); + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The gkeWorkload. + */ + com.google.cloud.developerconnect.v1.GKEWorkload getGkeWorkload(); + + /** + * + * + *
+   * Output only. Google Kubernetes Engine runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.GKEWorkload gke_workload = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.developerconnect.v1.GKEWorkloadOrBuilder getGkeWorkloadOrBuilder(); + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the appHubWorkload field is set. + */ + boolean hasAppHubWorkload(); + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The appHubWorkload. + */ + com.google.cloud.developerconnect.v1.AppHubWorkload getAppHubWorkload(); + + /** + * + * + *
+   * Output only. App Hub Workload.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AppHubWorkload app_hub_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.developerconnect.v1.AppHubWorkloadOrBuilder getAppHubWorkloadOrBuilder(); + + /** + * + * + *
+   * Required. Immutable. The URI of the runtime configuration.
+   * For GKE, this is the cluster name.
+   * For Cloud Run, this is the service name.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
+   * Required. Immutable. The URI of the runtime configuration.
+   * For GKE, this is the cluster name.
+   * For Cloud Run, this is the service name.
+   * 
+ * + * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
+   * Output only. The state of the Runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
+   * Output only. The state of the Runtime.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.RuntimeConfig.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.developerconnect.v1.RuntimeConfig.State getState(); + + com.google.cloud.developerconnect.v1.RuntimeConfig.RuntimeCase getRuntimeCase(); + + com.google.cloud.developerconnect.v1.RuntimeConfig.DerivedFromCase getDerivedFromCase(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/SystemProvider.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/SystemProvider.java new file mode 100644 index 000000000000..bac36987ee60 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/SystemProvider.java @@ -0,0 +1,343 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * SystemProvider is a list of providers that are owned by Developer Connect.
+ * 
+ * + * Protobuf enum {@code google.cloud.developerconnect.v1.SystemProvider} + */ +public enum SystemProvider implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No system provider specified.
+   * 
+ * + * SYSTEM_PROVIDER_UNSPECIFIED = 0; + */ + SYSTEM_PROVIDER_UNSPECIFIED(0), + /** + * + * + *
+   * GitHub provider.
+   * Scopes can be found at
+   * https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes
+   * 
+ * + * GITHUB = 1; + */ + GITHUB(1), + /** + * + * + *
+   * GitLab provider.
+   * Scopes can be found at
+   * https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes
+   * 
+ * + * GITLAB = 2; + */ + GITLAB(2), + /** + * + * + *
+   * Google provider.
+   * Recommended scopes:
+   *   "https://www.googleapis.com/auth/drive.readonly",
+   *   "https://www.googleapis.com/auth/documents.readonly"
+   * 
+ * + * GOOGLE = 3; + */ + GOOGLE(3), + /** + * + * + *
+   * Sentry provider.
+   * Scopes can be found at
+   * https://docs.sentry.io/api/permissions/
+   * 
+ * + * SENTRY = 4; + */ + SENTRY(4), + /** + * + * + *
+   * Rovo provider.
+   * Must select the "rovo" scope.
+   * 
+ * + * ROVO = 5; + */ + ROVO(5), + /** + * + * + *
+   * New Relic provider.
+   * No scopes are allowed.
+   * 
+ * + * NEW_RELIC = 6; + */ + NEW_RELIC(6), + /** + * + * + *
+   * Datastax provider.
+   * No scopes are allowed.
+   * 
+ * + * DATASTAX = 7; + */ + DATASTAX(7), + /** + * + * + *
+   * Dynatrace provider.
+   * 
+ * + * DYNATRACE = 8; + */ + DYNATRACE(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * No system provider specified.
+   * 
+ * + * SYSTEM_PROVIDER_UNSPECIFIED = 0; + */ + public static final int SYSTEM_PROVIDER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * GitHub provider.
+   * Scopes can be found at
+   * https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes
+   * 
+ * + * GITHUB = 1; + */ + public static final int GITHUB_VALUE = 1; + + /** + * + * + *
+   * GitLab provider.
+   * Scopes can be found at
+   * https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes
+   * 
+ * + * GITLAB = 2; + */ + public static final int GITLAB_VALUE = 2; + + /** + * + * + *
+   * Google provider.
+   * Recommended scopes:
+   *   "https://www.googleapis.com/auth/drive.readonly",
+   *   "https://www.googleapis.com/auth/documents.readonly"
+   * 
+ * + * GOOGLE = 3; + */ + public static final int GOOGLE_VALUE = 3; + + /** + * + * + *
+   * Sentry provider.
+   * Scopes can be found at
+   * https://docs.sentry.io/api/permissions/
+   * 
+ * + * SENTRY = 4; + */ + public static final int SENTRY_VALUE = 4; + + /** + * + * + *
+   * Rovo provider.
+   * Must select the "rovo" scope.
+   * 
+ * + * ROVO = 5; + */ + public static final int ROVO_VALUE = 5; + + /** + * + * + *
+   * New Relic provider.
+   * No scopes are allowed.
+   * 
+ * + * NEW_RELIC = 6; + */ + public static final int NEW_RELIC_VALUE = 6; + + /** + * + * + *
+   * Datastax provider.
+   * No scopes are allowed.
+   * 
+ * + * DATASTAX = 7; + */ + public static final int DATASTAX_VALUE = 7; + + /** + * + * + *
+   * Dynatrace provider.
+   * 
+ * + * DYNATRACE = 8; + */ + public static final int DYNATRACE_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 SystemProvider 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 SystemProvider forNumber(int value) { + switch (value) { + case 0: + return SYSTEM_PROVIDER_UNSPECIFIED; + case 1: + return GITHUB; + case 2: + return GITLAB; + case 3: + return GOOGLE; + case 4: + return SENTRY; + case 5: + return ROVO; + case 6: + return NEW_RELIC; + case 7: + return DATASTAX; + case 8: + return DYNATRACE; + 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 SystemProvider findValueByNumber(int number) { + return SystemProvider.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.developerconnect.v1.DeveloperConnectProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SystemProvider[] VALUES = values(); + + public static SystemProvider 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 SystemProvider(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.developerconnect.v1.SystemProvider) +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequest.java new file mode 100644 index 000000000000..290473d36bfc --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequest.java @@ -0,0 +1,1562 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Message for updating a AccountConnector
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.UpdateAccountConnectorRequest} + */ +public final class UpdateAccountConnectorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) + UpdateAccountConnectorRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateAccountConnectorRequest.newBuilder() to construct. + private UpdateAccountConnectorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAccountConnectorRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAccountConnectorRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int ACCOUNT_CONNECTOR_FIELD_NUMBER = 2; + private com.google.cloud.developerconnect.v1.AccountConnector accountConnector_; + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + @java.lang.Override + public boolean hasAccountConnector() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector() { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorOrBuilder() { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_ = false; + + /** + * + * + *
+   * Optional. If set to true, and the accountConnector is not found a new
+   * accountConnector will be created. In this situation `update_mask` is
+   * ignored. The creation will succeed only if the input accountConnector has
+   * all the necessary
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAccountConnector()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + 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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAccountConnector()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + 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.developerconnect.v1.UpdateAccountConnectorRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest other = + (com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasAccountConnector() != other.hasAccountConnector()) return false; + if (hasAccountConnector()) { + if (!getAccountConnector().equals(other.getAccountConnector())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasAccountConnector()) { + hash = (37 * hash) + ACCOUNT_CONNECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAccountConnector().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest 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.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + 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.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + java.io.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.developerconnect.v1.UpdateAccountConnectorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + parseDelimitedFrom( + java.io.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.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.UpdateAccountConnectorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a AccountConnector
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.UpdateAccountConnectorRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.class, + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.Builder.class); + } + + // Construct using + // com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateMaskFieldBuilder(); + getAccountConnectorFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + accountConnector_ = null; + if (accountConnectorBuilder_ != null) { + accountConnectorBuilder_.dispose(); + accountConnectorBuilder_ = null; + } + requestId_ = ""; + allowMissing_ = false; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_UpdateAccountConnectorRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest build() { + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest buildPartial() { + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest result = + new com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.accountConnector_ = + accountConnectorBuilder_ == null ? accountConnector_ : accountConnectorBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowMissing_ = allowMissing_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + 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.developerconnect.v1.UpdateAccountConnectorRequest) { + return mergeFrom( + (com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest other) { + if (other + == com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + .getDefaultInstance()) return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasAccountConnector()) { + mergeAccountConnector(other.getAccountConnector()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getAccountConnectorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. The list of fields to be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.developerconnect.v1.AccountConnector accountConnector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + accountConnectorBuilder_; + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + public boolean hasAccountConnector() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + public com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector() { + if (accountConnectorBuilder_ == null) { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } else { + return accountConnectorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accountConnector_ = value; + } else { + accountConnectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector.Builder builderForValue) { + if (accountConnectorBuilder_ == null) { + accountConnector_ = builderForValue.build(); + } else { + accountConnectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAccountConnector( + com.google.cloud.developerconnect.v1.AccountConnector value) { + if (accountConnectorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && accountConnector_ != null + && accountConnector_ + != com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance()) { + getAccountConnectorBuilder().mergeFrom(value); + } else { + accountConnector_ = value; + } + } else { + accountConnectorBuilder_.mergeFrom(value); + } + if (accountConnector_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAccountConnector() { + bitField0_ = (bitField0_ & ~0x00000002); + accountConnector_ = null; + if (accountConnectorBuilder_ != null) { + accountConnectorBuilder_.dispose(); + accountConnectorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnector.Builder + getAccountConnectorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAccountConnectorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder + getAccountConnectorOrBuilder() { + if (accountConnectorBuilder_ != null) { + return accountConnectorBuilder_.getMessageOrBuilder(); + } else { + return accountConnector_ == null + ? com.google.cloud.developerconnect.v1.AccountConnector.getDefaultInstance() + : accountConnector_; + } + } + + /** + * + * + *
+     * Required. The AccountConnector to update.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder> + getAccountConnectorFieldBuilder() { + if (accountConnectorBuilder_ == null) { + accountConnectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.AccountConnector, + com.google.cloud.developerconnect.v1.AccountConnector.Builder, + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder>( + getAccountConnector(), getParentForChildren(), isClean()); + accountConnector_ = null; + } + return accountConnectorBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean allowMissing_; + + /** + * + * + *
+     * Optional. If set to true, and the accountConnector is not found a new
+     * accountConnector will be created. In this situation `update_mask` is
+     * ignored. The creation will succeed only if the input accountConnector has
+     * all the necessary
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + /** + * + * + *
+     * Optional. If set to true, and the accountConnector is not found a new
+     * accountConnector will be created. In this situation `update_mask` is
+     * ignored. The creation will succeed only if the input accountConnector has
+     * all the necessary
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, and the accountConnector is not found a new
+     * accountConnector will be created. In this situation `update_mask` is
+     * ignored. The creation will succeed only if the input accountConnector has
+     * all the necessary
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000008); + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) + private static final com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest(); + } + + public static com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAccountConnectorRequest 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.developerconnect.v1.UpdateAccountConnectorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequestOrBuilder.java new file mode 100644 index 000000000000..c2fede310aae --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateAccountConnectorRequestOrBuilder.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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface UpdateAccountConnectorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.UpdateAccountConnectorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. The list of fields to be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the accountConnector field is set. + */ + boolean hasAccountConnector(); + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The accountConnector. + */ + com.google.cloud.developerconnect.v1.AccountConnector getAccountConnector(); + + /** + * + * + *
+   * Required. The AccountConnector to update.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.AccountConnector account_connector = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.AccountConnectorOrBuilder getAccountConnectorOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, and the accountConnector is not found a new
+   * accountConnector will be created. In this situation `update_mask` is
+   * ignored. The creation will succeed only if the input accountConnector has
+   * all the necessary
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequest.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequest.java new file mode 100644 index 000000000000..2a0d3a2688b6 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequest.java @@ -0,0 +1,1269 @@ +/* + * 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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * Request for updating an InsightsConfig.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.UpdateInsightsConfigRequest} + */ +public final class UpdateInsightsConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) + UpdateInsightsConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateInsightsConfigRequest.newBuilder() to construct. + private UpdateInsightsConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateInsightsConfigRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateInsightsConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int INSIGHTS_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.developerconnect.v1.InsightsConfig insightsConfig_; + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + @java.lang.Override + public boolean hasInsightsConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig() { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigOrBuilder() { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_ = false; + + /** + * + * + *
+   * Optional. If set to true, and the insightsConfig is not found a new
+   * insightsConfig will be created. In this situation `update_mask` is ignored.
+   * The creation will succeed only if the input insightsConfig has all the
+   * necessary information (e.g a github_config with both  user_oauth_token and
+   * installation_id properties).
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(2, getInsightsConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + 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(2, getInsightsConfig()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + 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.developerconnect.v1.UpdateInsightsConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest other = + (com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) obj; + + if (hasInsightsConfig() != other.hasInsightsConfig()) return false; + if (hasInsightsConfig()) { + if (!getInsightsConfig().equals(other.getInsightsConfig())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) 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 (hasInsightsConfig()) { + hash = (37 * hash) + INSIGHTS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInsightsConfig().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest 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.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + 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.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + java.io.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.developerconnect.v1.UpdateInsightsConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseDelimitedFrom( + java.io.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.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.UpdateInsightsConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request for updating an InsightsConfig.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.UpdateInsightsConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.class, + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInsightsConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + insightsConfig_ = null; + if (insightsConfigBuilder_ != null) { + insightsConfigBuilder_.dispose(); + insightsConfigBuilder_ = null; + } + requestId_ = ""; + allowMissing_ = false; + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.InsightsConfigProto + .internal_static_google_cloud_developerconnect_v1_UpdateInsightsConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest build() { + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest buildPartial() { + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest result = + new com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.insightsConfig_ = + insightsConfigBuilder_ == null ? insightsConfig_ : insightsConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allowMissing_ = allowMissing_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + 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.developerconnect.v1.UpdateInsightsConfigRequest) { + return mergeFrom((com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest other) { + if (other + == com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest.getDefaultInstance()) + return this; + if (other.hasInsightsConfig()) { + mergeInsightsConfig(other.getInsightsConfig()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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 18: + { + input.readMessage(getInsightsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.developerconnect.v1.InsightsConfig insightsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + insightsConfigBuilder_; + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + public boolean hasInsightsConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + public com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig() { + if (insightsConfigBuilder_ == null) { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } else { + return insightsConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInsightsConfig(com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + insightsConfig_ = value; + } else { + insightsConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setInsightsConfig( + com.google.cloud.developerconnect.v1.InsightsConfig.Builder builderForValue) { + if (insightsConfigBuilder_ == null) { + insightsConfig_ = builderForValue.build(); + } else { + insightsConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeInsightsConfig(com.google.cloud.developerconnect.v1.InsightsConfig value) { + if (insightsConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && insightsConfig_ != null + && insightsConfig_ + != com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance()) { + getInsightsConfigBuilder().mergeFrom(value); + } else { + insightsConfig_ = value; + } + } else { + insightsConfigBuilder_.mergeFrom(value); + } + if (insightsConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearInsightsConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + insightsConfig_ = null; + if (insightsConfigBuilder_ != null) { + insightsConfigBuilder_.dispose(); + insightsConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.InsightsConfig.Builder getInsightsConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInsightsConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder + getInsightsConfigOrBuilder() { + if (insightsConfigBuilder_ != null) { + return insightsConfigBuilder_.getMessageOrBuilder(); + } else { + return insightsConfig_ == null + ? com.google.cloud.developerconnect.v1.InsightsConfig.getDefaultInstance() + : insightsConfig_; + } + } + + /** + * + * + *
+     * Required. The resource being updated.
+     * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder> + getInsightsConfigFieldBuilder() { + if (insightsConfigBuilder_ == null) { + insightsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.developerconnect.v1.InsightsConfig, + com.google.cloud.developerconnect.v1.InsightsConfig.Builder, + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder>( + getInsightsConfig(), getParentForChildren(), isClean()); + insightsConfig_ = null; + } + return insightsConfigBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server will know to
+     * ignore the request if it has already been completed. The server will
+     * guarantee that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server can check if original operation with the same request ID
+     * was received, and if so, will ignore the second request. This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean allowMissing_; + + /** + * + * + *
+     * Optional. If set to true, and the insightsConfig is not found a new
+     * insightsConfig will be created. In this situation `update_mask` is ignored.
+     * The creation will succeed only if the input insightsConfig has all the
+     * necessary information (e.g a github_config with both  user_oauth_token and
+     * installation_id properties).
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + /** + * + * + *
+     * Optional. If set to true, and the insightsConfig is not found a new
+     * insightsConfig will be created. In this situation `update_mask` is ignored.
+     * The creation will succeed only if the input insightsConfig has all the
+     * necessary information (e.g a github_config with both  user_oauth_token and
+     * installation_id properties).
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set to true, and the insightsConfig is not found a new
+     * insightsConfig will be created. In this situation `update_mask` is ignored.
+     * The creation will succeed only if the input insightsConfig has all the
+     * necessary information (e.g a github_config with both  user_oauth_token and
+     * installation_id properties).
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If set, validate the request, but do not actually post it.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) + private static final com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest(); + } + + public static com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateInsightsConfigRequest 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.developerconnect.v1.UpdateInsightsConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequestOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequestOrBuilder.java new file mode 100644 index 000000000000..29e363ea42c9 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UpdateInsightsConfigRequestOrBuilder.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/developerconnect/v1/insights_config.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface UpdateInsightsConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.UpdateInsightsConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the insightsConfig field is set. + */ + boolean hasInsightsConfig(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The insightsConfig. + */ + com.google.cloud.developerconnect.v1.InsightsConfig getInsightsConfig(); + + /** + * + * + *
+   * Required. The resource being updated.
+   * 
+ * + * + * .google.cloud.developerconnect.v1.InsightsConfig insights_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.developerconnect.v1.InsightsConfigOrBuilder getInsightsConfigOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server will know to
+   * ignore the request if it has already been completed. The server will
+   * guarantee that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server can check if original operation with the same request ID
+   * was received, and if so, will ignore the second request. This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, and the insightsConfig is not found a new
+   * insightsConfig will be created. In this situation `update_mask` is ignored.
+   * The creation will succeed only if the input insightsConfig has all the
+   * necessary information (e.g a github_config with both  user_oauth_token and
+   * installation_id properties).
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set, validate the request, but do not actually post it.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/User.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/User.java new file mode 100644 index 000000000000..dbd466ebec5d --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/User.java @@ -0,0 +1,1455 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +/** + * + * + *
+ * User represents a user connected to the service providers through
+ * a AccountConnector.
+ * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.User} + */ +public final class User extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.developerconnect.v1.User) + UserOrBuilder { + private static final long serialVersionUID = 0L; + + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private User() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new User(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.User.class, + com.google.cloud.developerconnect.v1.User.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Resource name of the user, in the format
+   * `projects/*/locations/*/accountConnectors/*/users/*`.
+   * 
+ * + * 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. Resource name of the user, in the format
+   * `projects/*/locations/*/accountConnectors/*/users/*`.
+   * 
+ * + * 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_ = ""; + + /** + * + * + *
+   * Output only. Developer Connect automatically converts user identity
+   * to some human readable description, e.g., email address.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. Developer Connect automatically converts user identity
+   * to some human readable description, e.g., email address.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 LAST_TOKEN_REQUEST_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp lastTokenRequestTime_; + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTokenRequestTime field is set. + */ + @java.lang.Override + public boolean hasLastTokenRequestTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTokenRequestTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastTokenRequestTime() { + return lastTokenRequestTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTokenRequestTime_; + } + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastTokenRequestTimeOrBuilder() { + return lastTokenRequestTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTokenRequestTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getLastTokenRequestTime()); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastTokenRequestTime()); + } + 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.developerconnect.v1.User)) { + return super.equals(obj); + } + com.google.cloud.developerconnect.v1.User other = + (com.google.cloud.developerconnect.v1.User) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasLastTokenRequestTime() != other.hasLastTokenRequestTime()) return false; + if (hasLastTokenRequestTime()) { + if (!getLastTokenRequestTime().equals(other.getLastTokenRequestTime())) 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(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasLastTokenRequestTime()) { + hash = (37 * hash) + LAST_TOKEN_REQUEST_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastTokenRequestTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.developerconnect.v1.User parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.User 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.developerconnect.v1.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.User parseFrom( + 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.developerconnect.v1.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.developerconnect.v1.User parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.developerconnect.v1.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.User parseFrom( + java.io.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.developerconnect.v1.User parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.User parseDelimitedFrom( + java.io.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.developerconnect.v1.User parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.developerconnect.v1.User parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.developerconnect.v1.User prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * User represents a user connected to the service providers through
+   * a AccountConnector.
+   * 
+ * + * Protobuf type {@code google.cloud.developerconnect.v1.User} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.developerconnect.v1.User) + com.google.cloud.developerconnect.v1.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.developerconnect.v1.User.class, + com.google.cloud.developerconnect.v1.User.Builder.class); + } + + // Construct using com.google.cloud.developerconnect.v1.User.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getLastTokenRequestTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + lastTokenRequestTime_ = null; + if (lastTokenRequestTimeBuilder_ != null) { + lastTokenRequestTimeBuilder_.dispose(); + lastTokenRequestTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.developerconnect.v1.DeveloperConnectProto + .internal_static_google_cloud_developerconnect_v1_User_descriptor; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.User getDefaultInstanceForType() { + return com.google.cloud.developerconnect.v1.User.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.User build() { + com.google.cloud.developerconnect.v1.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.developerconnect.v1.User buildPartial() { + com.google.cloud.developerconnect.v1.User result = + new com.google.cloud.developerconnect.v1.User(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.developerconnect.v1.User result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastTokenRequestTime_ = + lastTokenRequestTimeBuilder_ == null + ? lastTokenRequestTime_ + : lastTokenRequestTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + 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.developerconnect.v1.User) { + return mergeFrom((com.google.cloud.developerconnect.v1.User) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.developerconnect.v1.User other) { + if (other == com.google.cloud.developerconnect.v1.User.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.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasLastTokenRequestTime()) { + mergeLastTokenRequestTime(other.getLastTokenRequestTime()); + } + 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: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getLastTokenRequestTimeFieldBuilder().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 java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Resource name of the user, in the format
+     * `projects/*/locations/*/accountConnectors/*/users/*`.
+     * 
+ * + * 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. Resource name of the user, in the format
+     * `projects/*/locations/*/accountConnectors/*/users/*`.
+     * 
+ * + * 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. Resource name of the user, in the format
+     * `projects/*/locations/*/accountConnectors/*/users/*`.
+     * 
+ * + * 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. Resource name of the user, in the format
+     * `projects/*/locations/*/accountConnectors/*/users/*`.
+     * 
+ * + * 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. Resource name of the user, in the format
+     * `projects/*/locations/*/accountConnectors/*/users/*`.
+     * 
+ * + * 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_ = ""; + + /** + * + * + *
+     * Output only. Developer Connect automatically converts user identity
+     * to some human readable description, e.g., email address.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. Developer Connect automatically converts user identity
+     * to some human readable description, e.g., email address.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. Developer Connect automatically converts user identity
+     * to some human readable description, e.g., email address.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Developer Connect automatically converts user identity
+     * to some human readable description, e.g., email address.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Developer Connect automatically converts user identity
+     * to some human readable description, e.g., email address.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + 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 timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the user was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + 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 lastTokenRequestTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastTokenRequestTimeBuilder_; + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTokenRequestTime field is set. + */ + public boolean hasLastTokenRequestTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTokenRequestTime. + */ + public com.google.protobuf.Timestamp getLastTokenRequestTime() { + if (lastTokenRequestTimeBuilder_ == null) { + return lastTokenRequestTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTokenRequestTime_; + } else { + return lastTokenRequestTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTokenRequestTime(com.google.protobuf.Timestamp value) { + if (lastTokenRequestTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastTokenRequestTime_ = value; + } else { + lastTokenRequestTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTokenRequestTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastTokenRequestTimeBuilder_ == null) { + lastTokenRequestTime_ = builderForValue.build(); + } else { + lastTokenRequestTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastTokenRequestTime(com.google.protobuf.Timestamp value) { + if (lastTokenRequestTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastTokenRequestTime_ != null + && lastTokenRequestTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastTokenRequestTimeBuilder().mergeFrom(value); + } else { + lastTokenRequestTime_ = value; + } + } else { + lastTokenRequestTimeBuilder_.mergeFrom(value); + } + if (lastTokenRequestTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastTokenRequestTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastTokenRequestTime_ = null; + if (lastTokenRequestTimeBuilder_ != null) { + lastTokenRequestTimeBuilder_.dispose(); + lastTokenRequestTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastTokenRequestTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getLastTokenRequestTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastTokenRequestTimeOrBuilder() { + if (lastTokenRequestTimeBuilder_ != null) { + return lastTokenRequestTimeBuilder_.getMessageOrBuilder(); + } else { + return lastTokenRequestTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTokenRequestTime_; + } + } + + /** + * + * + *
+     * Output only. The timestamp when the token was last requested.
+     * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastTokenRequestTimeFieldBuilder() { + if (lastTokenRequestTimeBuilder_ == null) { + lastTokenRequestTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastTokenRequestTime(), getParentForChildren(), isClean()); + lastTokenRequestTime_ = null; + } + return lastTokenRequestTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.developerconnect.v1.User) + } + + // @@protoc_insertion_point(class_scope:google.cloud.developerconnect.v1.User) + private static final com.google.cloud.developerconnect.v1.User DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.developerconnect.v1.User(); + } + + public static com.google.cloud.developerconnect.v1.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public User 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.developerconnect.v1.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserName.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserName.java new file mode 100644 index 000000000000..e5f1ad554684 --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserName.java @@ -0,0 +1,268 @@ +/* + * 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.developerconnect.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 UserName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ACCOUNT_CONNECTOR_USER = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String accountConnector; + private final String user; + + @Deprecated + protected UserName() { + project = null; + location = null; + accountConnector = null; + user = null; + } + + private UserName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + accountConnector = Preconditions.checkNotNull(builder.getAccountConnector()); + user = Preconditions.checkNotNull(builder.getUser()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAccountConnector() { + return accountConnector; + } + + public String getUser() { + return user; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserName of(String project, String location, String accountConnector, String user) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAccountConnector(accountConnector) + .setUser(user) + .build(); + } + + public static String format( + String project, String location, String accountConnector, String user) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAccountConnector(accountConnector) + .setUser(user) + .build() + .toString(); + } + + public static UserName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ACCOUNT_CONNECTOR_USER.validatedMatch( + formattedString, "UserName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("account_connector"), + matchMap.get("user")); + } + + 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 (UserName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ACCOUNT_CONNECTOR_USER.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 (accountConnector != null) { + fieldMapBuilder.put("account_connector", accountConnector); + } + if (user != null) { + fieldMapBuilder.put("user", user); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ACCOUNT_CONNECTOR_USER.instantiate( + "project", + project, + "location", + location, + "account_connector", + accountConnector, + "user", + user); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserName that = ((UserName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.accountConnector, that.accountConnector) + && Objects.equals(this.user, that.user); + } + 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(accountConnector); + h *= 1000003; + h ^= Objects.hashCode(user); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}. + */ + public static class Builder { + private String project; + private String location; + private String accountConnector; + private String user; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAccountConnector() { + return accountConnector; + } + + public String getUser() { + return user; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAccountConnector(String accountConnector) { + this.accountConnector = accountConnector; + return this; + } + + public Builder setUser(String user) { + this.user = user; + return this; + } + + private Builder(UserName userName) { + this.project = userName.project; + this.location = userName.location; + this.accountConnector = userName.accountConnector; + this.user = userName.user; + } + + public UserName build() { + return new UserName(this); + } + } +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserOrBuilder.java b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserOrBuilder.java new file mode 100644 index 000000000000..7365ea21628f --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/java/com/google/cloud/developerconnect/v1/UserOrBuilder.java @@ -0,0 +1,165 @@ +/* + * 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/developerconnect/v1/developer_connect.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.developerconnect.v1; + +public interface UserOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.developerconnect.v1.User) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Resource name of the user, in the format
+   * `projects/*/locations/*/accountConnectors/*/users/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Resource name of the user, in the format
+   * `projects/*/locations/*/accountConnectors/*/users/*`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Developer Connect automatically converts user identity
+   * to some human readable description, e.g., email address.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
+   * Output only. Developer Connect automatically converts user identity
+   * to some human readable description, e.g., email address.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the user was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTokenRequestTime field is set. + */ + boolean hasLastTokenRequestTime(); + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTokenRequestTime. + */ + com.google.protobuf.Timestamp getLastTokenRequestTime(); + + /** + * + * + *
+   * Output only. The timestamp when the token was last requested.
+   * 
+ * + * + * .google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastTokenRequestTimeOrBuilder(); +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/developer_connect.proto b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/developer_connect.proto index 4c831ee2b73d..2b99faf47c97 100644 --- a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/developer_connect.proto +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/developer_connect.proto @@ -209,6 +209,194 @@ service DeveloperConnect { }; option (google.api.method_signature) = "git_repository_link,ref_type"; } + + // Lists AccountConnectors in a given project and location. + rpc ListAccountConnectors(ListAccountConnectorsRequest) + returns (ListAccountConnectorsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/accountConnectors" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AccountConnector. + rpc GetAccountConnector(GetAccountConnectorRequest) + returns (AccountConnector) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/accountConnectors/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new AccountConnector in a given project and location. + rpc CreateAccountConnector(CreateAccountConnectorRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/accountConnectors" + body: "account_connector" + }; + option (google.api.method_signature) = + "parent,account_connector,account_connector_id"; + option (google.longrunning.operation_info) = { + response_type: "AccountConnector" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single AccountConnector. + rpc UpdateAccountConnector(UpdateAccountConnectorRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{account_connector.name=projects/*/locations/*/accountConnectors/*}" + body: "account_connector" + }; + option (google.api.method_signature) = "account_connector,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AccountConnector" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single AccountConnector. + rpc DeleteAccountConnector(DeleteAccountConnectorRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/accountConnectors/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Fetches OAuth access token based on end user credentials. + rpc FetchAccessToken(FetchAccessTokenRequest) + returns (FetchAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{account_connector=projects/*/locations/*/accountConnectors/*}/users:fetchAccessToken" + body: "*" + }; + option (google.api.method_signature) = "account_connector"; + } + + // Lists Users in a given project, location, and account_connector. + rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/accountConnectors/*}/users" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single User. + rpc DeleteUser(DeleteUserRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/accountConnectors/*/users/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Fetch the User based on the user credentials. + rpc FetchSelf(FetchSelfRequest) returns (User) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/accountConnectors/*}/users:fetchSelf" + }; + option (google.api.method_signature) = "name"; + } + + // Delete the User based on the user credentials. + rpc DeleteSelf(DeleteSelfRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/accountConnectors/*}/users:deleteSelf" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// SystemProvider is a list of providers that are owned by Developer Connect. +enum SystemProvider { + // No system provider specified. + SYSTEM_PROVIDER_UNSPECIFIED = 0; + + // GitHub provider. + // Scopes can be found at + // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes + GITHUB = 1; + + // GitLab provider. + // Scopes can be found at + // https://docs.gitlab.com/user/profile/personal_access_tokens/#personal-access-token-scopes + GITLAB = 2; + + // Google provider. + // Recommended scopes: + // "https://www.googleapis.com/auth/drive.readonly", + // "https://www.googleapis.com/auth/documents.readonly" + GOOGLE = 3; + + // Sentry provider. + // Scopes can be found at + // https://docs.sentry.io/api/permissions/ + SENTRY = 4; + + // Rovo provider. + // Must select the "rovo" scope. + ROVO = 5; + + // New Relic provider. + // No scopes are allowed. + NEW_RELIC = 6; + + // Datastax provider. + // No scopes are allowed. + DATASTAX = 7; + + // Dynatrace provider. + DYNATRACE = 8; +} + +// Message for requesting a list of Users +message ListUsersRequest { + // Required. Parent value for ListUsersRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "developerconnect.googleapis.com/User" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Users +message ListUsersResponse { + // The list of Users + repeated User users = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; } // Message describing Connection object @@ -234,6 +422,12 @@ message Connection { // Configuration for connections to an instance of GitLab Enterprise. GitLabEnterpriseConfig gitlab_enterprise_config = 16; + + // Configuration for connections to an instance of Bitbucket Data Center. + BitbucketDataCenterConfig bitbucket_data_center_config = 17; + + // Configuration for connections to an instance of Bitbucket Clouds. + BitbucketCloudConfig bitbucket_cloud_config = 18; } // Identifier. The resource name of the connection, in the format @@ -276,8 +470,7 @@ message Connection { // client has an up-to-date value before proceeding. string etag = 10 [(google.api.field_behavior) = OPTIONAL]; - // Output only. A system-assigned unique identifier for a the - // GitRepositoryLink. + // Output only. A system-assigned unique identifier for the Connection. string uid = 12 [ (google.api.field_info).format = UUID4, (google.api.field_behavior) = OUTPUT_ONLY @@ -287,6 +480,11 @@ message Connection { // Customer-Managed Encryption Keys (CMEK) feature. CryptoKeyConfig crypto_key_config = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the git proxy feature. Enabling the git proxy + // allows clients to perform git operations on the repositories linked in the + // connection. + GitProxyConfig git_proxy_config = 19 [(google.api.field_behavior) = OPTIONAL]; } // The crypto key configuration. This field is used by the Customer-managed @@ -303,6 +501,13 @@ message CryptoKeyConfig { ]; } +// The git proxy configuration. +message GitProxyConfig { + // Optional. Setting this to true allows the git proxy to be used for + // performing git operations on the repositories linked in the connection. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; +} + // Describes stage and necessary actions to be taken by the // user to complete the installation. Used for GitHub and GitHub Enterprise // based connections. @@ -547,6 +752,82 @@ message GitLabEnterpriseConfig { string server_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Configuration for connections to an instance of Bitbucket Data Center. +message BitbucketDataCenterConfig { + // Required. The URI of the Bitbucket Data Center host this connection is for. + string host_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. SecretManager resource containing the webhook secret + // used to verify webhook events, formatted as + // `projects/*/secrets/*/versions/*`. This is used to validate webhooks. + string webhook_secret_secret_version = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. An http access token with the minimum `Repository read` access. + // It's recommended to use a system account to generate the credentials. + UserCredential read_authorizer_credential = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. An http access token with the minimum `Repository admin` scope + // access. This is needed to create webhooks. It's recommended to use a system + // account to generate these credentials. + UserCredential authorizer_credential = 4 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration for using Service Directory to privately connect to + // a Bitbucket Data Center instance. This should only be set if the Bitbucket + // Data Center is hosted on-premises and not reachable by public internet. If + // this field is left empty, calls to the Bitbucket Data Center will be made + // over the public internet. + ServiceDirectoryConfig service_directory_config = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SSL certificate authority to trust when making requests to + // Bitbucket Data Center. + string ssl_ca_certificate = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Version of the Bitbucket Data Center server running on the + // `host_uri`. + string server_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration for connections to an instance of Bitbucket Cloud. +message BitbucketCloudConfig { + // Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud + // Platform. + string workspace = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. SecretManager resource containing the webhook secret + // used to verify webhook events, formatted as + // `projects/*/secrets/*/versions/*`. This is used to validate and create + // webhooks. + string webhook_secret_secret_version = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + + // Required. An access token with the minimum `repository` access. + // It can either be a workspace, project or repository access token. + // It's recommended to use a system account to generate the credentials. + UserCredential read_authorizer_credential = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Required. An access token with the minimum `repository`, `pullrequest` and + // `webhook` scope access. It can either be a workspace, project or repository + // access token. This is needed to create webhooks. It's recommended to use a + // system account to generate these credentials. + UserCredential authorizer_credential = 4 + [(google.api.field_behavior) = REQUIRED]; +} + // Message for requesting list of Connections message ListConnectionsRequest { // Required. Parent value for ListConnectionsRequest @@ -713,6 +994,212 @@ message DeleteConnectionRequest { string etag = 4 [(google.api.field_behavior) = OPTIONAL]; } +// Message for requesting list of AccountConnectors +message ListAccountConnectorsRequest { + // Required. Parent value for ListAccountConnectorsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "developerconnect.googleapis.com/AccountConnector" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing AccountConnectors +message ListAccountConnectorsResponse { + // The list of AccountConnectors + repeated AccountConnector account_connectors = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a AccountConnector +message GetAccountConnectorRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/AccountConnector" + } + ]; +} + +message CreateAccountConnectorRequest { + // Required. Location resource name as the account_connector’s parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "developerconnect.googleapis.com/AccountConnector" + } + ]; + + // Required. The ID to use for the AccountConnector, which will become the + // final component of the AccountConnector's resource name. Its format should + // adhere to https://google.aip.dev/122#resource-id-segments Names must be + // unique per-project per-location. + string account_connector_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AccountConnector to create. + AccountConnector account_connector = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for updating a AccountConnector +message UpdateAccountConnectorRequest { + // Optional. The list of fields to be updated. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The AccountConnector to update. + AccountConnector account_connector = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, and the accountConnector is not found a new + // accountConnector will be created. In this situation `update_mask` is + // ignored. The creation will succeed only if the input accountConnector has + // all the necessary + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a AccountConnector +message DeleteAccountConnectorRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/AccountConnector" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The current etag of the AccountConnectorn. + // If an etag is provided and does not match the current etag of the + // AccountConnector, deletion will be blocked and an ABORTED error will be + // returned. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, any Users from this AccountConnector will also + // be deleted. (Otherwise, the request will only work if the AccountConnector + // has no Users.) + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a User +message DeleteUserRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/User" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; +} + // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. @@ -744,6 +1231,65 @@ message OperationMetadata { string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Message for fetching a User of the user themselves. +message FetchSelfRequest { + // Required. Name of the AccountConnector resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/AccountConnector" + } + ]; +} + +// Message for deleting a User of the user themselves. +message DeleteSelfRequest { + // Required. Name of the AccountConnector resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/AccountConnector" + } + ]; +} + +// Message for fetching an OAuth access token. +message FetchAccessTokenRequest { + // Required. The resource name of the AccountConnector in the format + // `projects/*/locations/*/accountConnectors/*`. + string account_connector = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/AccountConnector" + } + ]; +} + +// Message for responding to getting an OAuth access token. +message FetchAccessTokenResponse { + // The token content. + string token = 1; + + // Expiration timestamp. Can be empty if unknown or non-expiring. + google.protobuf.Timestamp expiration_time = 2; + + // The scopes of the access token. + repeated string scopes = 3; + + // The error resulted from exchanging OAuth tokens from the service provider. + ExchangeError exchange_error = 4; +} + +// Message for representing an error from exchanging OAuth tokens. +message ExchangeError { + // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - error + string code = 1; + + // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 - + // error_description + string description = 2; +} + // Message describing the GitRepositoryLink object message GitRepositoryLink { option (google.api.resource) = { @@ -788,8 +1334,7 @@ message GitRepositoryLink { // Optional. Allows clients to store small amounts of arbitrary data. map annotations = 9 [(google.api.field_behavior) = OPTIONAL]; - // Output only. A system-assigned unique identifier for a the - // GitRepositoryLink. + // Output only. A system-assigned unique identifier for the GitRepositoryLink. string uid = 10 [ (google.api.field_info).format = UUID4, (google.api.field_behavior) = OUTPUT_ONLY @@ -797,6 +1342,11 @@ message GitRepositoryLink { // Output only. External ID of the webhook created for the repository. string webhook_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI to access the linked repository through the Git Proxy. + // This field is only populated if the git proxy is enabled for the + // connection. + string git_proxy_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Message for creating a GitRepositoryLink @@ -1083,3 +1633,92 @@ message FetchGitRefsResponse { // A token identifying a page of results the server should return. string next_page_token = 2; } + +// AccountConnector encapsulates what a platform administrator needs to +// configure for users to connect to the service providers, which includes, +// among other fields, the OAuth client ID, client secret, and authorization and +// token endpoints. +message AccountConnector { + option (google.api.resource) = { + type: "developerconnect.googleapis.com/AccountConnector" + pattern: "projects/{project}/locations/{location}/accountConnectors/{account_connector}" + plural: "accountConnectors" + singular: "accountConnector" + style: DECLARATIVE_FRIENDLY + }; + + // The AccountConnector config. + oneof account_connector_config { + // Provider OAuth config. + ProviderOAuthConfig provider_oauth_config = 5; + } + + // Identifier. The resource name of the accountConnector, in the format + // `projects/{project}/locations/{location}/accountConnectors/{account_connector_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The timestamp when the accountConnector was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the accountConnector was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Allows users to store small amounts of arbitrary data. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels as key value pairs + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Start OAuth flow by clicking on this URL. + string oauth_start_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// User represents a user connected to the service providers through +// a AccountConnector. +message User { + option (google.api.resource) = { + type: "developerconnect.googleapis.com/User" + pattern: "projects/{project}/locations/{location}/accountConnectors/{account_connector}/users/{user}" + plural: "users" + singular: "user" + }; + + // Identifier. Resource name of the user, in the format + // `projects/*/locations/*/accountConnectors/*/users/*`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Developer Connect automatically converts user identity + // to some human readable description, e.g., email address. + string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the user was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the token was last requested. + google.protobuf.Timestamp last_token_request_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ProviderOAuthConfig is the OAuth config for a provider. +message ProviderOAuthConfig { + // OAuth Provider ID. It could be Developer Connect owned or providers + // provided. + oneof oauth_provider_id { + // Immutable. Developer Connect provided OAuth. + SystemProvider system_provider_id = 1 + [(google.api.field_behavior) = IMMUTABLE]; + } + + // Required. User selected scopes to apply to the Oauth config + // In the event of changing scopes, user records under AccountConnector will + // be deleted and users will re-auth again. + repeated string scopes = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/insights_config.proto b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/insights_config.proto new file mode 100644 index 000000000000..779a60f2726d --- /dev/null +++ b/java-developerconnect/proto-google-cloud-developerconnect-v1/src/main/proto/google/cloud/developerconnect/v1/insights_config.proto @@ -0,0 +1,452 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.developerconnect.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/developerconnect/v1/developer_connect.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DeveloperConnect.V1"; +option go_package = "cloud.google.com/go/developerconnect/apiv1/developerconnectpb;developerconnectpb"; +option java_multiple_files = true; +option java_outer_classname = "InsightsConfigProto"; +option java_package = "com.google.cloud.developerconnect.v1"; +option php_namespace = "Google\\Cloud\\DeveloperConnect\\V1"; + +// Creates and manages InsightsConfigs. +// +// The InsightsConfig resource is the core configuration object to capture +// events from your Software Development Lifecycle. It acts as the central hub +// for managing how Developer connect understands your application, its runtime +// environments, and the artifacts deployed within them. +// A user can create an InsightsConfig, list previously-requested +// InsightsConfigs or get InsightsConfigs by their ID to determine the status of +// the InsightsConfig. +service InsightsConfigService { + option (google.api.default_host) = "developerconnect.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists InsightsConfigs in a given project and location. + rpc ListInsightsConfigs(ListInsightsConfigsRequest) + returns (ListInsightsConfigsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/insightsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a new InsightsConfig in a given project and location. + rpc CreateInsightsConfig(CreateInsightsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/insightsConfigs" + body: "insights_config" + }; + option (google.api.method_signature) = + "parent,insights_config,insights_config_id"; + option (google.longrunning.operation_info) = { + response_type: "InsightsConfig" + metadata_type: "google.cloud.developerconnect.v1.OperationMetadata" + }; + } + + // Gets details of a single Insight. + rpc GetInsightsConfig(GetInsightsConfigRequest) returns (InsightsConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/insightsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the parameters of a single InsightsConfig. + rpc UpdateInsightsConfig(UpdateInsightsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{insights_config.name=projects/*/locations/*/insightsConfigs/*}" + body: "insights_config" + }; + option (google.longrunning.operation_info) = { + response_type: "InsightsConfig" + metadata_type: "google.cloud.developerconnect.v1.OperationMetadata" + }; + } + + // Delete a single Insight. + rpc DeleteInsightsConfig(DeleteInsightsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/insightsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.developerconnect.v1.OperationMetadata" + }; + } +} + +// The InsightsConfig resource is the core configuration object to capture +// events from your Software Development Lifecycle. It acts as the central hub +// for managing how Developer connect understands your application, its runtime +// environments, and the artifacts deployed within them. +message InsightsConfig { + option (google.api.resource) = { + type: "developerconnect.googleapis.com/InsightsConfig" + pattern: "projects/{project}/locations/{location}/insightsConfigs/{insights_config}" + plural: "insightsConfigs" + singular: "insightsConfig" + style: DECLARATIVE_FRIENDLY + }; + + // The state of the InsightsConfig. + enum State { + // No state specified. + STATE_UNSPECIFIED = 0; + + // The InsightsConfig is pending application discovery/runtime discovery. + PENDING = 5; + + // The initial discovery process is complete. + COMPLETE = 3; + + // The InsightsConfig is in an error state. + ERROR = 4; + } + + // The context of the InsightsConfig. + oneof insights_config_context { + // Optional. The name of the App Hub Application. + // Format: + // projects/{project}/locations/{location}/applications/{application} + string app_hub_application = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. The name of the InsightsConfig. + // Format: + // projects/{project}/locations/{location}/insightsConfigs/{insightsConfig} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. [Output only] Create timestamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update timestamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The runtime configurations where the application is deployed. + repeated RuntimeConfig runtime_configs = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The artifact configurations of the artifacts that are deployed. + repeated ArtifactConfig artifact_configs = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. The state of the InsightsConfig. + State state = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User specified annotations. See + // https://google.aip.dev/148#annotations for more details such as format and + // size limitations. + map annotations = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set of labels associated with an InsightsConfig. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reconciling (https://google.aip.dev/128#reconciliation). + // Set to true if the current state of InsightsConfig does not match the + // user's intended state, and the service is actively updating the resource to + // reconcile them. This can happen due to user-triggered updates or + // system actions like failover or maintenance. + bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Any errors that occurred while setting up the InsightsConfig. + // Each error will be in the format: `field_name: error_message`, e.g. + // GetAppHubApplication: Permission denied while getting App Hub + // application. Please grant permissions to the P4SA. + repeated google.rpc.Status errors = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RuntimeConfig represents the runtimes where the application is +// deployed. +message RuntimeConfig { + // The state of the runtime in the InsightsConfig. + // Whether the runtime is linked to the InsightsConfig. + enum State { + // No state specified. + STATE_UNSPECIFIED = 0; + + // The runtime configuration has been linked to the InsightsConfig. + LINKED = 1; + + // The runtime configuration has been unlinked to the InsightsConfig. + UNLINKED = 2; + } + + // The type of the runtime. + oneof runtime { + // Output only. Google Kubernetes Engine runtime. + GKEWorkload gke_workload = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Where the runtime is derived from. + oneof derived_from { + // Output only. App Hub Workload. + AppHubWorkload app_hub_workload = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Required. Immutable. The URI of the runtime configuration. + // For GKE, this is the cluster name. + // For Cloud Run, this is the service name. + string uri = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. The state of the Runtime. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GKEWorkload represents the Google Kubernetes Engine runtime. +message GKEWorkload { + // Required. Immutable. The name of the GKE cluster. + // Format: + // `projects/{project}/locations/{location}/clusters/{cluster}`. + string cluster = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. The name of the GKE deployment. + // Format: + // `projects/{project}/locations/{location}/clusters/{cluster}/namespaces/{namespace}/deployments/{deployment}`. + string deployment = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// AppHubWorkload represents the App Hub Workload. +message AppHubWorkload { + // Required. Output only. Immutable. The name of the App Hub Workload. + // Format: + // `projects/{project}/locations/{location}/applications/{application}/workloads/{workload}`. + string workload = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Output only. The criticality of the App Hub Workload. + string criticality = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The environment of the App Hub Workload. + string environment = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The artifact config of the artifact that is deployed. +message ArtifactConfig { + // The storage location of the artifact. + oneof artifact_storage { + // Optional. Set if the artifact is stored in Artifact regsitry. + GoogleArtifactRegistry google_artifact_registry = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The storage location of the artifact metadata. + oneof artifact_metadata_storage { + // Optional. Set if the artifact metadata is stored in Artifact analysis. + GoogleArtifactAnalysis google_artifact_analysis = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Immutable. The URI of the artifact that is deployed. + // e.g. `us-docker.pkg.dev/my-project/my-repo/image`. + // The URI does not include the tag / digest because it captures a lineage of + // artifacts. + string uri = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Google Artifact Analysis configurations. +message GoogleArtifactAnalysis { + // Required. The project id of the project where the provenance is stored. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Google Artifact Registry configurations. +message GoogleArtifactRegistry { + // Required. The host project of Artifact Registry. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The name of the artifact registry package. + string artifact_registry_package = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Request for creating an InsightsConfig. +message CreateInsightsConfigRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "developerconnect.googleapis.com/InsightsConfig" + } + ]; + + // Required. ID of the requesting InsightsConfig. + string insights_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created. + InsightsConfig insights_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for getting an InsightsConfig. +message GetInsightsConfigRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/InsightsConfig" + } + ]; +} + +// Request for requesting list of InsightsConfigs. +message ListInsightsConfigsRequest { + // Required. Parent value for ListInsightsConfigsRequest. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "developerconnect.googleapis.com/InsightsConfig" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. See https://google.aip.dev/160 for more + // details. Filter string, adhering to the rules in + // https://google.aip.dev/160. List only InsightsConfigs matching the filter. + // If filter is empty, all InsightsConfigs are listed. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for response to listing InsightsConfigs. +message ListInsightsConfigsResponse { + // The list of InsightsConfigs. + repeated InsightsConfig insights_configs = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// +// Request for deleting an InsightsConfig. +message DeleteInsightsConfigRequest { + // Required. Value for parent. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "developerconnect.googleapis.com/InsightsConfig" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This checksum is computed by the server based on the value of + // other fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for updating an InsightsConfig. +message UpdateInsightsConfigRequest { + // Required. The resource being updated. + InsightsConfig insights_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, and the insightsConfig is not found a new + // insightsConfig will be created. In this situation `update_mask` is ignored. + // The creation will succeed only if the input insightsConfig has all the + // necessary information (e.g a github_config with both user_oauth_token and + // installation_id properties). + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request, but do not actually post it. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnector.java new file mode 100644 index 000000000000..a53252a0953a --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnector.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateAccountConnector { + + public static void main(String[] args) throws Exception { + asyncCreateAccountConnector(); + } + + public static void asyncCreateAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + CreateAccountConnectorRequest request = + CreateAccountConnectorRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAccountConnectorId("accountConnectorId-605811237") + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + ApiFuture future = + developerConnectClient.createAccountConnectorCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnectorLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnectorLRO.java new file mode 100644 index 000000000000..1dea5e5fe0d5 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/AsyncCreateAccountConnectorLRO.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.cloud.developerconnect.v1.OperationMetadata; + +public class AsyncCreateAccountConnectorLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAccountConnectorLRO(); + } + + public static void asyncCreateAccountConnectorLRO() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + CreateAccountConnectorRequest request = + CreateAccountConnectorRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAccountConnectorId("accountConnectorId-605811237") + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + OperationFuture future = + developerConnectClient.createAccountConnectorOperationCallable().futureCall(request); + // Do something. + AccountConnector response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnector.java new file mode 100644 index 000000000000..4323217ffd91 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnector.java @@ -0,0 +1,50 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.CreateAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateAccountConnector { + + public static void main(String[] args) throws Exception { + syncCreateAccountConnector(); + } + + public static void syncCreateAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + CreateAccountConnectorRequest request = + CreateAccountConnectorRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAccountConnectorId("accountConnectorId-605811237") + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + AccountConnector response = developerConnectClient.createAccountConnectorAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorLocationnameAccountconnectorString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorLocationnameAccountconnectorString.java new file mode 100644 index 000000000000..3c2fd7b4ccdb --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorLocationnameAccountconnectorString.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_LocationnameAccountconnectorString_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateAccountConnectorLocationnameAccountconnectorString { + + public static void main(String[] args) throws Exception { + syncCreateAccountConnectorLocationnameAccountconnectorString(); + } + + public static void syncCreateAccountConnectorLocationnameAccountconnectorString() + throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + AccountConnector response = + developerConnectClient + .createAccountConnectorAsync(parent, accountConnector, accountConnectorId) + .get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_LocationnameAccountconnectorString_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorStringAccountconnectorString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorStringAccountconnectorString.java new file mode 100644 index 000000000000..48534ebca9d4 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/createaccountconnector/SyncCreateAccountConnectorStringAccountconnectorString.java @@ -0,0 +1,47 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_StringAccountconnectorString_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateAccountConnectorStringAccountconnectorString { + + public static void main(String[] args) throws Exception { + syncCreateAccountConnectorStringAccountconnectorString(); + } + + public static void syncCreateAccountConnectorStringAccountconnectorString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + String accountConnectorId = "accountConnectorId-605811237"; + AccountConnector response = + developerConnectClient + .createAccountConnectorAsync(parent, accountConnector, accountConnectorId) + .get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_CreateAccountConnector_StringAccountconnectorString_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnector.java new file mode 100644 index 000000000000..5053439a5557 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnector.java @@ -0,0 +1,56 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteAccountConnector { + + public static void main(String[] args) throws Exception { + asyncDeleteAccountConnector(); + } + + public static void asyncDeleteAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteAccountConnectorRequest request = + DeleteAccountConnectorRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .setForce(true) + .build(); + ApiFuture future = + developerConnectClient.deleteAccountConnectorCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnectorLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnectorLRO.java new file mode 100644 index 000000000000..74075ec1ed0b --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/AsyncDeleteAccountConnectorLRO.java @@ -0,0 +1,57 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteAccountConnectorLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAccountConnectorLRO(); + } + + public static void asyncDeleteAccountConnectorLRO() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteAccountConnectorRequest request = + DeleteAccountConnectorRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .setForce(true) + .build(); + OperationFuture future = + developerConnectClient.deleteAccountConnectorOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnector.java new file mode 100644 index 000000000000..851933df3ea6 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnector.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. + */ + +package com.google.cloud.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteAccountConnectorRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAccountConnector { + + public static void main(String[] args) throws Exception { + syncDeleteAccountConnector(); + } + + public static void syncDeleteAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteAccountConnectorRequest request = + DeleteAccountConnectorRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .setForce(true) + .build(); + developerConnectClient.deleteAccountConnectorAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorAccountconnectorname.java new file mode 100644 index 000000000000..f91c8c0eaee1 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorAccountconnectorname.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAccountConnectorAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncDeleteAccountConnectorAccountconnectorname(); + } + + public static void syncDeleteAccountConnectorAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + developerConnectClient.deleteAccountConnectorAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorString.java new file mode 100644 index 000000000000..86fd64f23fad --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteaccountconnector/SyncDeleteAccountConnectorString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAccountConnectorString { + + public static void main(String[] args) throws Exception { + syncDeleteAccountConnectorString(); + } + + public static void syncDeleteAccountConnectorString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + developerConnectClient.deleteAccountConnectorAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteAccountConnector_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelf.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelf.java new file mode 100644 index 000000000000..5cf89eab8b20 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelf.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteSelf { + + public static void main(String[] args) throws Exception { + asyncDeleteSelf(); + } + + public static void asyncDeleteSelf() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteSelfRequest request = + DeleteSelfRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + ApiFuture future = developerConnectClient.deleteSelfCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelfLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelfLRO.java new file mode 100644 index 000000000000..c24b49f77829 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/AsyncDeleteSelfLRO.java @@ -0,0 +1,53 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteSelfLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteSelfLRO(); + } + + public static void asyncDeleteSelfLRO() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteSelfRequest request = + DeleteSelfRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + OperationFuture future = + developerConnectClient.deleteSelfOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelf.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelf.java new file mode 100644 index 000000000000..7f7070b2cff8 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelf.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeleteSelfRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSelf { + + public static void main(String[] args) throws Exception { + syncDeleteSelf(); + } + + public static void syncDeleteSelf() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteSelfRequest request = + DeleteSelfRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + developerConnectClient.deleteSelfAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfAccountconnectorname.java new file mode 100644 index 000000000000..6d4661c7daa2 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfAccountconnectorname.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSelfAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncDeleteSelfAccountconnectorname(); + } + + public static void syncDeleteSelfAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + developerConnectClient.deleteSelfAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfString.java new file mode 100644 index 000000000000..d58fca88e60e --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteself/SyncDeleteSelfString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteSelf_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.Empty; + +public class SyncDeleteSelfString { + + public static void main(String[] args) throws Exception { + syncDeleteSelfString(); + } + + public static void syncDeleteSelfString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + developerConnectClient.deleteSelfAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteSelf_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUser.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUser.java new file mode 100644 index 000000000000..d6110dde2dbd --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUser.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UserName; +import com.google.longrunning.Operation; + +public class AsyncDeleteUser { + + public static void main(String[] args) throws Exception { + asyncDeleteUser(); + } + + public static void asyncDeleteUser() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = developerConnectClient.deleteUserCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUserLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUserLRO.java new file mode 100644 index 000000000000..4b32152f12e5 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/AsyncDeleteUserLRO.java @@ -0,0 +1,56 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UserName; +import com.google.protobuf.Empty; + +public class AsyncDeleteUserLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteUserLRO(); + } + + public static void asyncDeleteUserLRO() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + developerConnectClient.deleteUserOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUser.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUser.java new file mode 100644 index 000000000000..41370b3d5fa6 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUser.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] +import com.google.cloud.developerconnect.v1.DeleteUserRequest; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUser { + + public static void main(String[] args) throws Exception { + syncDeleteUser(); + } + + public static void syncDeleteUser() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + DeleteUserRequest request = + DeleteUserRequest.newBuilder() + .setName( + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]") + .toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + developerConnectClient.deleteUserAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserString.java new file mode 100644 index 000000000000..17fbca737221 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_String_sync] +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserString { + + public static void main(String[] args) throws Exception { + syncDeleteUserString(); + } + + public static void syncDeleteUserString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String name = + UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]").toString(); + developerConnectClient.deleteUserAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserUsername.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserUsername.java new file mode 100644 index 000000000000..2f158f489b1b --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/deleteuser/SyncDeleteUserUsername.java @@ -0,0 +1,42 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_DeleteUser_Username_sync] +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UserName; +import com.google.protobuf.Empty; + +public class SyncDeleteUserUsername { + + public static void main(String[] args) throws Exception { + syncDeleteUserUsername(); + } + + public static void syncDeleteUserUsername() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + UserName name = UserName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]", "[USER]"); + developerConnectClient.deleteUserAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_DeleteUser_Username_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/AsyncFetchAccessToken.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/AsyncFetchAccessToken.java new file mode 100644 index 000000000000..04af9556e1bd --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/AsyncFetchAccessToken.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. + */ + +package com.google.cloud.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; + +public class AsyncFetchAccessToken { + + public static void main(String[] args) throws Exception { + asyncFetchAccessToken(); + } + + public static void asyncFetchAccessToken() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + FetchAccessTokenRequest request = + FetchAccessTokenRequest.newBuilder() + .setAccountConnector( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + ApiFuture future = + developerConnectClient.fetchAccessTokenCallable().futureCall(request); + // Do something. + FetchAccessTokenResponse response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessToken.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessToken.java new file mode 100644 index 000000000000..bf2f2118ebde --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessToken.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchAccessTokenRequest; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; + +public class SyncFetchAccessToken { + + public static void main(String[] args) throws Exception { + syncFetchAccessToken(); + } + + public static void syncFetchAccessToken() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + FetchAccessTokenRequest request = + FetchAccessTokenRequest.newBuilder() + .setAccountConnector( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(request); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenAccountconnectorname.java new file mode 100644 index 000000000000..70fe939ef645 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenAccountconnectorname.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; + +public class SyncFetchAccessTokenAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncFetchAccessTokenAccountconnectorname(); + } + + public static void syncFetchAccessTokenAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenString.java new file mode 100644 index 000000000000..3a31d77255dc --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchaccesstoken/SyncFetchAccessTokenString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchAccessTokenResponse; + +public class SyncFetchAccessTokenString { + + public static void main(String[] args) throws Exception { + syncFetchAccessTokenString(); + } + + public static void syncFetchAccessTokenString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String accountConnector = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + FetchAccessTokenResponse response = developerConnectClient.fetchAccessToken(accountConnector); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchAccessToken_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/AsyncFetchSelf.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/AsyncFetchSelf.java new file mode 100644 index 000000000000..d85141b4ec13 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/AsyncFetchSelf.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.User; + +public class AsyncFetchSelf { + + public static void main(String[] args) throws Exception { + asyncFetchSelf(); + } + + public static void asyncFetchSelf() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + FetchSelfRequest request = + FetchSelfRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + ApiFuture future = developerConnectClient.fetchSelfCallable().futureCall(request); + // Do something. + User response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelf.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelf.java new file mode 100644 index 000000000000..4a0043449bb8 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelf.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.FetchSelfRequest; +import com.google.cloud.developerconnect.v1.User; + +public class SyncFetchSelf { + + public static void main(String[] args) throws Exception { + syncFetchSelf(); + } + + public static void syncFetchSelf() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + FetchSelfRequest request = + FetchSelfRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + User response = developerConnectClient.fetchSelf(request); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfAccountconnectorname.java new file mode 100644 index 000000000000..05bc0e432e3d --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfAccountconnectorname.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.User; + +public class SyncFetchSelfAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncFetchSelfAccountconnectorname(); + } + + public static void syncFetchSelfAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + User response = developerConnectClient.fetchSelf(name); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfString.java new file mode 100644 index 000000000000..1e254b11385d --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/fetchself/SyncFetchSelfString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_FetchSelf_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.User; + +public class SyncFetchSelfString { + + public static void main(String[] args) throws Exception { + syncFetchSelfString(); + } + + public static void syncFetchSelfString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + User response = developerConnectClient.fetchSelf(name); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_FetchSelf_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/AsyncGetAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/AsyncGetAccountConnector.java new file mode 100644 index 000000000000..61fb7f890d64 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/AsyncGetAccountConnector.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. + */ + +package com.google.cloud.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; + +public class AsyncGetAccountConnector { + + public static void main(String[] args) throws Exception { + asyncGetAccountConnector(); + } + + public static void asyncGetAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + GetAccountConnectorRequest request = + GetAccountConnectorRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + ApiFuture future = + developerConnectClient.getAccountConnectorCallable().futureCall(request); + // Do something. + AccountConnector response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnector.java new file mode 100644 index 000000000000..d4b0950e27e6 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnector.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.GetAccountConnectorRequest; + +public class SyncGetAccountConnector { + + public static void main(String[] args) throws Exception { + syncGetAccountConnector(); + } + + public static void syncGetAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + GetAccountConnectorRequest request = + GetAccountConnectorRequest.newBuilder() + .setName( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .build(); + AccountConnector response = developerConnectClient.getAccountConnector(request); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorAccountconnectorname.java new file mode 100644 index 000000000000..9c7e649abac2 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorAccountconnectorname.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; + +public class SyncGetAccountConnectorAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncGetAccountConnectorAccountconnectorname(); + } + + public static void syncGetAccountConnectorAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + AccountConnector response = developerConnectClient.getAccountConnector(name); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorString.java new file mode 100644 index 000000000000..2a806567fb60 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/getaccountconnector/SyncGetAccountConnectorString.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; + +public class SyncGetAccountConnectorString { + + public static void main(String[] args) throws Exception { + syncGetAccountConnectorString(); + } + + public static void syncGetAccountConnectorString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String name = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + AccountConnector response = developerConnectClient.getAccountConnector(name); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_GetAccountConnector_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectors.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectors.java new file mode 100644 index 000000000000..3ad24e7a1034 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectors.java @@ -0,0 +1,56 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.LocationName; + +public class AsyncListAccountConnectors { + + public static void main(String[] args) throws Exception { + asyncListAccountConnectors(); + } + + public static void asyncListAccountConnectors() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListAccountConnectorsRequest request = + ListAccountConnectorsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + developerConnectClient.listAccountConnectorsPagedCallable().futureCall(request); + // Do something. + for (AccountConnector element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectorsPaged.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectorsPaged.java new file mode 100644 index 000000000000..4cfbcab863a1 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/AsyncListAccountConnectorsPaged.java @@ -0,0 +1,64 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_Paged_async] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsResponse; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAccountConnectorsPaged { + + public static void main(String[] args) throws Exception { + asyncListAccountConnectorsPaged(); + } + + public static void asyncListAccountConnectorsPaged() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListAccountConnectorsRequest request = + ListAccountConnectorsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAccountConnectorsResponse response = + developerConnectClient.listAccountConnectorsCallable().call(request); + for (AccountConnector element : response.getAccountConnectorsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_Paged_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectors.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectors.java new file mode 100644 index 000000000000..2aa7663a8b32 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectors.java @@ -0,0 +1,53 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListAccountConnectorsRequest; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListAccountConnectors { + + public static void main(String[] args) throws Exception { + syncListAccountConnectors(); + } + + public static void syncListAccountConnectors() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListAccountConnectorsRequest request = + ListAccountConnectorsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AccountConnector element : + developerConnectClient.listAccountConnectors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsLocationname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsLocationname.java new file mode 100644 index 000000000000..4a24767636d2 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsLocationname.java @@ -0,0 +1,45 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_Locationname_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListAccountConnectorsLocationname { + + public static void main(String[] args) throws Exception { + syncListAccountConnectorsLocationname(); + } + + public static void syncListAccountConnectorsLocationname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AccountConnector element : + developerConnectClient.listAccountConnectors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_Locationname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsString.java new file mode 100644 index 000000000000..40ab170f654e --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listaccountconnectors/SyncListAccountConnectorsString.java @@ -0,0 +1,45 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListAccountConnectorsString { + + public static void main(String[] args) throws Exception { + syncListAccountConnectorsString(); + } + + public static void syncListAccountConnectorsString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AccountConnector element : + developerConnectClient.listAccountConnectors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListAccountConnectors_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsers.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsers.java new file mode 100644 index 000000000000..6fa53badcc1b --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsers.java @@ -0,0 +1,57 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListUsers_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.User; + +public class AsyncListUsers { + + public static void main(String[] args) throws Exception { + asyncListUsers(); + } + + public static void asyncListUsers() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = developerConnectClient.listUsersPagedCallable().futureCall(request); + // Do something. + for (User element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListUsers_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsersPaged.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsersPaged.java new file mode 100644 index 000000000000..bac6c7de233a --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/AsyncListUsersPaged.java @@ -0,0 +1,65 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListUsers_Paged_async] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.ListUsersResponse; +import com.google.cloud.developerconnect.v1.User; +import com.google.common.base.Strings; + +public class AsyncListUsersPaged { + + public static void main(String[] args) throws Exception { + asyncListUsersPaged(); + } + + public static void asyncListUsersPaged() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListUsersResponse response = developerConnectClient.listUsersCallable().call(request); + for (User element : response.getUsersList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListUsers_Paged_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsers.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsers.java new file mode 100644 index 000000000000..bcb5aa31f524 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsers.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.ListUsersRequest; +import com.google.cloud.developerconnect.v1.User; + +public class SyncListUsers { + + public static void main(String[] args) throws Exception { + syncListUsers(); + } + + public static void syncListUsers() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + ListUsersRequest request = + ListUsersRequest.newBuilder() + .setParent( + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (User element : developerConnectClient.listUsers(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListUsers_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersAccountconnectorname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersAccountconnectorname.java new file mode 100644 index 000000000000..9e8b275f14a1 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersAccountconnectorname.java @@ -0,0 +1,45 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListUsers_Accountconnectorname_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.User; + +public class SyncListUsersAccountconnectorname { + + public static void main(String[] args) throws Exception { + syncListUsersAccountconnectorname(); + } + + public static void syncListUsersAccountconnectorname() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnectorName parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]"); + for (User element : developerConnectClient.listUsers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListUsers_Accountconnectorname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersString.java new file mode 100644 index 000000000000..7a9dba4aa474 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/listusers/SyncListUsersString.java @@ -0,0 +1,45 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_ListUsers_String_sync] +import com.google.cloud.developerconnect.v1.AccountConnectorName; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.User; + +public class SyncListUsersString { + + public static void main(String[] args) throws Exception { + syncListUsersString(); + } + + public static void syncListUsersString() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + String parent = + AccountConnectorName.of("[PROJECT]", "[LOCATION]", "[ACCOUNT_CONNECTOR]").toString(); + for (User element : developerConnectClient.listUsers(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_ListUsers_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnector.java new file mode 100644 index 000000000000..941d1ebe70b9 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnector.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAccountConnector { + + public static void main(String[] args) throws Exception { + asyncUpdateAccountConnector(); + } + + public static void asyncUpdateAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + UpdateAccountConnectorRequest request = + UpdateAccountConnectorRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + ApiFuture future = + developerConnectClient.updateAccountConnectorCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnectorLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnectorLRO.java new file mode 100644 index 000000000000..56c9f8baeda2 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/AsyncUpdateAccountConnectorLRO.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAccountConnectorLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAccountConnectorLRO(); + } + + public static void asyncUpdateAccountConnectorLRO() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + UpdateAccountConnectorRequest request = + UpdateAccountConnectorRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + OperationFuture future = + developerConnectClient.updateAccountConnectorOperationCallable().futureCall(request); + // Do something. + AccountConnector response = future.get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnector.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnector.java new file mode 100644 index 000000000000..e3fae7a2858b --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnector.java @@ -0,0 +1,50 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.cloud.developerconnect.v1.UpdateAccountConnectorRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAccountConnector { + + public static void main(String[] args) throws Exception { + syncUpdateAccountConnector(); + } + + public static void syncUpdateAccountConnector() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + UpdateAccountConnectorRequest request = + UpdateAccountConnectorRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAccountConnector(AccountConnector.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + AccountConnector response = developerConnectClient.updateAccountConnectorAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnectorAccountconnectorFieldmask.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnectorAccountconnectorFieldmask.java new file mode 100644 index 000000000000..13223aae3bab --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/developerconnect/updateaccountconnector/SyncUpdateAccountConnectorAccountconnectorFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_AccountconnectorFieldmask_sync] +import com.google.cloud.developerconnect.v1.AccountConnector; +import com.google.cloud.developerconnect.v1.DeveloperConnectClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAccountConnectorAccountconnectorFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAccountConnectorAccountconnectorFieldmask(); + } + + public static void syncUpdateAccountConnectorAccountconnectorFieldmask() throws Exception { + // 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 (DeveloperConnectClient developerConnectClient = DeveloperConnectClient.create()) { + AccountConnector accountConnector = AccountConnector.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AccountConnector response = + developerConnectClient.updateAccountConnectorAsync(accountConnector, updateMask).get(); + } + } +} +// [END developerconnect_v1_generated_DeveloperConnect_UpdateAccountConnector_AccountconnectorFieldmask_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetCredentialsProvider.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a9a43b6ce529 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceSettings; +import com.google.cloud.developerconnect.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + InsightsConfigServiceSettings insightsConfigServiceSettings = + InsightsConfigServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create(insightsConfigServiceSettings); + } +} +// [END developerconnect_v1_generated_InsightsConfigService_Create_SetCredentialsProvider_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetEndpoint.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..911b69653f48 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_Create_SetEndpoint_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceSettings; +import com.google.cloud.developerconnect.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + InsightsConfigServiceSettings insightsConfigServiceSettings = + InsightsConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create(insightsConfigServiceSettings); + } +} +// [END developerconnect_v1_generated_InsightsConfigService_Create_SetEndpoint_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateUseHttpJsonTransport.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..4126faca3997 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // 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 + InsightsConfigServiceSettings insightsConfigServiceSettings = + InsightsConfigServiceSettings.newHttpJsonBuilder().build(); + InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create(insightsConfigServiceSettings); + } +} +// [END developerconnect_v1_generated_InsightsConfigService_Create_UseHttpJsonTransport_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfig.java new file mode 100644 index 000000000000..b8785f275987 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfig.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateInsightsConfig { + + public static void main(String[] args) throws Exception { + asyncCreateInsightsConfig(); + } + + public static void asyncCreateInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + CreateInsightsConfigRequest request = + CreateInsightsConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInsightsConfigId("insightsConfigId774395128") + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + insightsConfigServiceClient.createInsightsConfigCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfigLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfigLRO.java new file mode 100644 index 000000000000..addbeb4c35bc --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/AsyncCreateInsightsConfigLRO.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.cloud.developerconnect.v1.OperationMetadata; + +public class AsyncCreateInsightsConfigLRO { + + public static void main(String[] args) throws Exception { + asyncCreateInsightsConfigLRO(); + } + + public static void asyncCreateInsightsConfigLRO() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + CreateInsightsConfigRequest request = + CreateInsightsConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInsightsConfigId("insightsConfigId774395128") + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + insightsConfigServiceClient.createInsightsConfigOperationCallable().futureCall(request); + // Do something. + InsightsConfig response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfig.java new file mode 100644 index 000000000000..c487a020d28e --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfig.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.CreateInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateInsightsConfig { + + public static void main(String[] args) throws Exception { + syncCreateInsightsConfig(); + } + + public static void syncCreateInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + CreateInsightsConfigRequest request = + CreateInsightsConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setInsightsConfigId("insightsConfigId774395128") + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setValidateOnly(true) + .build(); + InsightsConfig response = + insightsConfigServiceClient.createInsightsConfigAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigLocationnameInsightsconfigString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigLocationnameInsightsconfigString.java new file mode 100644 index 000000000000..2a865a1582f6 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigLocationnameInsightsconfigString.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_LocationnameInsightsconfigString_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateInsightsConfigLocationnameInsightsconfigString { + + public static void main(String[] args) throws Exception { + syncCreateInsightsConfigLocationnameInsightsconfigString(); + } + + public static void syncCreateInsightsConfigLocationnameInsightsconfigString() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + InsightsConfig response = + insightsConfigServiceClient + .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId) + .get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_LocationnameInsightsconfigString_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigStringInsightsconfigString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigStringInsightsconfigString.java new file mode 100644 index 000000000000..ffd8548ed321 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/createinsightsconfig/SyncCreateInsightsConfigStringInsightsconfigString.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_StringInsightsconfigString_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncCreateInsightsConfigStringInsightsconfigString { + + public static void main(String[] args) throws Exception { + syncCreateInsightsConfigStringInsightsconfigString(); + } + + public static void syncCreateInsightsConfigStringInsightsconfigString() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + InsightsConfig insightsConfig = InsightsConfig.newBuilder().build(); + String insightsConfigId = "insightsConfigId774395128"; + InsightsConfig response = + insightsConfigServiceClient + .createInsightsConfigAsync(parent, insightsConfig, insightsConfigId) + .get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_CreateInsightsConfig_StringInsightsconfigString_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfig.java new file mode 100644 index 000000000000..c321a427d29c --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfig.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteInsightsConfig { + + public static void main(String[] args) throws Exception { + asyncDeleteInsightsConfig(); + } + + public static void asyncDeleteInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + DeleteInsightsConfigRequest request = + DeleteInsightsConfigRequest.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = + insightsConfigServiceClient.deleteInsightsConfigCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfigLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfigLRO.java new file mode 100644 index 000000000000..06a6ac78e45c --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/AsyncDeleteInsightsConfigLRO.java @@ -0,0 +1,56 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteInsightsConfigLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteInsightsConfigLRO(); + } + + public static void asyncDeleteInsightsConfigLRO() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + DeleteInsightsConfigRequest request = + DeleteInsightsConfigRequest.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + insightsConfigServiceClient.deleteInsightsConfigOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfig.java new file mode 100644 index 000000000000..0773363bb319 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfig.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.DeleteInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInsightsConfig { + + public static void main(String[] args) throws Exception { + syncDeleteInsightsConfig(); + } + + public static void syncDeleteInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + DeleteInsightsConfigRequest request = + DeleteInsightsConfigRequest.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + insightsConfigServiceClient.deleteInsightsConfigAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigInsightsconfigname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigInsightsconfigname.java new file mode 100644 index 000000000000..ddf196296f62 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigInsightsconfigname.java @@ -0,0 +1,44 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_Insightsconfigname_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInsightsConfigInsightsconfigname { + + public static void main(String[] args) throws Exception { + syncDeleteInsightsConfigInsightsconfigname(); + } + + public static void syncDeleteInsightsConfigInsightsconfigname() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + insightsConfigServiceClient.deleteInsightsConfigAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_Insightsconfigname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigString.java new file mode 100644 index 000000000000..bcbc4471ef63 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/deleteinsightsconfig/SyncDeleteInsightsConfigString.java @@ -0,0 +1,44 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_String_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteInsightsConfigString { + + public static void main(String[] args) throws Exception { + syncDeleteInsightsConfigString(); + } + + public static void syncDeleteInsightsConfigString() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + String name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString(); + insightsConfigServiceClient.deleteInsightsConfigAsync(name).get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_DeleteInsightsConfig_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/AsyncGetInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/AsyncGetInsightsConfig.java new file mode 100644 index 000000000000..ee4784565678 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/AsyncGetInsightsConfig.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. + */ + +package com.google.cloud.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; + +public class AsyncGetInsightsConfig { + + public static void main(String[] args) throws Exception { + asyncGetInsightsConfig(); + } + + public static void asyncGetInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + GetInsightsConfigRequest request = + GetInsightsConfigRequest.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .build(); + ApiFuture future = + insightsConfigServiceClient.getInsightsConfigCallable().futureCall(request); + // Do something. + InsightsConfig response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfig.java new file mode 100644 index 000000000000..4ca652834c10 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfig.java @@ -0,0 +1,48 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.GetInsightsConfigRequest; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; + +public class SyncGetInsightsConfig { + + public static void main(String[] args) throws Exception { + syncGetInsightsConfig(); + } + + public static void syncGetInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + GetInsightsConfigRequest request = + GetInsightsConfigRequest.newBuilder() + .setName( + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString()) + .build(); + InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(request); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigInsightsconfigname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigInsightsconfigname.java new file mode 100644 index 000000000000..6806a9bbbf4d --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigInsightsconfigname.java @@ -0,0 +1,44 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_Insightsconfigname_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; + +public class SyncGetInsightsConfigInsightsconfigname { + + public static void main(String[] args) throws Exception { + syncGetInsightsConfigInsightsconfigname(); + } + + public static void syncGetInsightsConfigInsightsconfigname() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + InsightsConfigName name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]"); + InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_Insightsconfigname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigString.java new file mode 100644 index 000000000000..ec56e3d9d626 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getinsightsconfig/SyncGetInsightsConfigString.java @@ -0,0 +1,44 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_String_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigName; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; + +public class SyncGetInsightsConfigString { + + public static void main(String[] args) throws Exception { + syncGetInsightsConfigString(); + } + + public static void syncGetInsightsConfigString() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + String name = + InsightsConfigName.of("[PROJECT]", "[LOCATION]", "[INSIGHTS_CONFIG]").toString(); + InsightsConfig response = insightsConfigServiceClient.getInsightsConfig(name); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetInsightsConfig_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/AsyncGetLocation.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..5ee671cee8ac --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,47 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + insightsConfigServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetLocation_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/SyncGetLocation.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..41ef51f7d167 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/getlocation/SyncGetLocation.java @@ -0,0 +1,43 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_GetLocation_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = insightsConfigServiceClient.getLocation(request); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_GetLocation_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigs.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigs.java new file mode 100644 index 000000000000..8a9b2aefc4dc --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigs.java @@ -0,0 +1,57 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.LocationName; + +public class AsyncListInsightsConfigs { + + public static void main(String[] args) throws Exception { + asyncListInsightsConfigs(); + } + + public static void asyncListInsightsConfigs() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListInsightsConfigsRequest request = + ListInsightsConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + insightsConfigServiceClient.listInsightsConfigsPagedCallable().futureCall(request); + // Do something. + for (InsightsConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigsPaged.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigsPaged.java new file mode 100644 index 000000000000..21a193a5f3f9 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/AsyncListInsightsConfigsPaged.java @@ -0,0 +1,65 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_Paged_async] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsResponse; +import com.google.cloud.developerconnect.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListInsightsConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListInsightsConfigsPaged(); + } + + public static void asyncListInsightsConfigsPaged() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListInsightsConfigsRequest request = + ListInsightsConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListInsightsConfigsResponse response = + insightsConfigServiceClient.listInsightsConfigsCallable().call(request); + for (InsightsConfig element : response.getInsightsConfigsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_Paged_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigs.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigs.java new file mode 100644 index 000000000000..75593cdfb9dc --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigs.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.ListInsightsConfigsRequest; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListInsightsConfigs { + + public static void main(String[] args) throws Exception { + syncListInsightsConfigs(); + } + + public static void syncListInsightsConfigs() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListInsightsConfigsRequest request = + ListInsightsConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (InsightsConfig element : + insightsConfigServiceClient.listInsightsConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsLocationname.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsLocationname.java new file mode 100644 index 000000000000..1525610b62fd --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsLocationname.java @@ -0,0 +1,46 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_Locationname_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListInsightsConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListInsightsConfigsLocationname(); + } + + public static void syncListInsightsConfigsLocationname() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (InsightsConfig element : + insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_Locationname_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsString.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsString.java new file mode 100644 index 000000000000..85f84ea57365 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listinsightsconfigs/SyncListInsightsConfigsString.java @@ -0,0 +1,46 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_String_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.LocationName; + +public class SyncListInsightsConfigsString { + + public static void main(String[] args) throws Exception { + syncListInsightsConfigsString(); + } + + public static void syncListInsightsConfigsString() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (InsightsConfig element : + insightsConfigServiceClient.listInsightsConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListInsightsConfigs_String_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocations.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..5d70b2bc806d --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocations.java @@ -0,0 +1,55 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + insightsConfigServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListLocations_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocationsPaged.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..460fe4dc0d87 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListLocations_Paged_async] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + insightsConfigServiceClient.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; + } + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListLocations_Paged_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/SyncListLocations.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..0e685118c90f --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/listlocations/SyncListLocations.java @@ -0,0 +1,51 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_ListLocations_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : insightsConfigServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_ListLocations_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfig.java new file mode 100644 index 000000000000..30c671dbad89 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfig.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateInsightsConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateInsightsConfig(); + } + + public static void asyncUpdateInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + ApiFuture future = + insightsConfigServiceClient.updateInsightsConfigCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfigLRO.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfigLRO.java new file mode 100644 index 000000000000..615cc296484a --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/AsyncUpdateInsightsConfigLRO.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.OperationMetadata; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; + +public class AsyncUpdateInsightsConfigLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateInsightsConfigLRO(); + } + + public static void asyncUpdateInsightsConfigLRO() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + OperationFuture future = + insightsConfigServiceClient.updateInsightsConfigOperationCallable().futureCall(request); + // Do something. + InsightsConfig response = future.get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_LRO_async] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/SyncUpdateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/SyncUpdateInsightsConfig.java new file mode 100644 index 000000000000..e56e0770e1a5 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservice/updateinsightsconfig/SyncUpdateInsightsConfig.java @@ -0,0 +1,50 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.InsightsConfig; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceClient; +import com.google.cloud.developerconnect.v1.UpdateInsightsConfigRequest; + +public class SyncUpdateInsightsConfig { + + public static void main(String[] args) throws Exception { + syncUpdateInsightsConfig(); + } + + public static void syncUpdateInsightsConfig() throws Exception { + // 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 (InsightsConfigServiceClient insightsConfigServiceClient = + InsightsConfigServiceClient.create()) { + UpdateInsightsConfigRequest request = + UpdateInsightsConfigRequest.newBuilder() + .setInsightsConfig(InsightsConfig.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + InsightsConfig response = + insightsConfigServiceClient.updateInsightsConfigAsync(request).get(); + } + } +} +// [END developerconnect_v1_generated_InsightsConfigService_UpdateInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/createinsightsconfig/SyncCreateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/createinsightsconfig/SyncCreateInsightsConfig.java new file mode 100644 index 000000000000..dfb97968d743 --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/createinsightsconfig/SyncCreateInsightsConfig.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigServiceSettings_CreateInsightsConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.developerconnect.v1.InsightsConfigServiceSettings; +import java.time.Duration; + +public class SyncCreateInsightsConfig { + + public static void main(String[] args) throws Exception { + syncCreateInsightsConfig(); + } + + public static void syncCreateInsightsConfig() throws Exception { + // 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 + InsightsConfigServiceSettings.Builder insightsConfigServiceSettingsBuilder = + InsightsConfigServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + insightsConfigServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END developerconnect_v1_generated_InsightsConfigServiceSettings_CreateInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/getinsightsconfig/SyncGetInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/getinsightsconfig/SyncGetInsightsConfig.java new file mode 100644 index 000000000000..09b547a73dbd --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/insightsconfigservicesettings/getinsightsconfig/SyncGetInsightsConfig.java @@ -0,0 +1,57 @@ +/* + * 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.developerconnect.v1.samples; + +// [START developerconnect_v1_generated_InsightsConfigServiceSettings_GetInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.InsightsConfigServiceSettings; +import java.time.Duration; + +public class SyncGetInsightsConfig { + + public static void main(String[] args) throws Exception { + syncGetInsightsConfig(); + } + + public static void syncGetInsightsConfig() throws Exception { + // 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 + InsightsConfigServiceSettings.Builder insightsConfigServiceSettingsBuilder = + InsightsConfigServiceSettings.newBuilder(); + insightsConfigServiceSettingsBuilder + .getInsightsConfigSettings() + .setRetrySettings( + insightsConfigServiceSettingsBuilder + .getInsightsConfigSettings() + .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()); + InsightsConfigServiceSettings insightsConfigServiceSettings = + insightsConfigServiceSettingsBuilder.build(); + } +} +// [END developerconnect_v1_generated_InsightsConfigServiceSettings_GetInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/createinsightsconfig/SyncCreateInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/createinsightsconfig/SyncCreateInsightsConfig.java new file mode 100644 index 000000000000..979e5ec7255b --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/createinsightsconfig/SyncCreateInsightsConfig.java @@ -0,0 +1,54 @@ +/* + * 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.developerconnect.v1.stub.samples; + +// [START developerconnect_v1_generated_InsightsConfigServiceStubSettings_CreateInsightsConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.developerconnect.v1.stub.InsightsConfigServiceStubSettings; +import java.time.Duration; + +public class SyncCreateInsightsConfig { + + public static void main(String[] args) throws Exception { + syncCreateInsightsConfig(); + } + + public static void syncCreateInsightsConfig() throws Exception { + // 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 + InsightsConfigServiceStubSettings.Builder insightsConfigServiceSettingsBuilder = + InsightsConfigServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + insightsConfigServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END developerconnect_v1_generated_InsightsConfigServiceStubSettings_CreateInsightsConfig_sync] diff --git a/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/getinsightsconfig/SyncGetInsightsConfig.java b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/getinsightsconfig/SyncGetInsightsConfig.java new file mode 100644 index 000000000000..71eec0663e7e --- /dev/null +++ b/java-developerconnect/samples/snippets/generated/com/google/cloud/developerconnect/v1/stub/insightsconfigservicestubsettings/getinsightsconfig/SyncGetInsightsConfig.java @@ -0,0 +1,57 @@ +/* + * 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.developerconnect.v1.stub.samples; + +// [START developerconnect_v1_generated_InsightsConfigServiceStubSettings_GetInsightsConfig_sync] +import com.google.cloud.developerconnect.v1.stub.InsightsConfigServiceStubSettings; +import java.time.Duration; + +public class SyncGetInsightsConfig { + + public static void main(String[] args) throws Exception { + syncGetInsightsConfig(); + } + + public static void syncGetInsightsConfig() throws Exception { + // 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 + InsightsConfigServiceStubSettings.Builder insightsConfigServiceSettingsBuilder = + InsightsConfigServiceStubSettings.newBuilder(); + insightsConfigServiceSettingsBuilder + .getInsightsConfigSettings() + .setRetrySettings( + insightsConfigServiceSettingsBuilder + .getInsightsConfigSettings() + .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()); + InsightsConfigServiceStubSettings insightsConfigServiceSettings = + insightsConfigServiceSettingsBuilder.build(); + } +} +// [END developerconnect_v1_generated_InsightsConfigServiceStubSettings_GetInsightsConfig_sync] diff --git a/java-java-shopping-merchant-issue-resolution/README.md b/java-java-shopping-merchant-issue-resolution/README.md index 0380b40df20e..e745bf4d650e 100644 --- a/java-java-shopping-merchant-issue-resolution/README.md +++ b/java-java-shopping-merchant-issue-resolution/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.shopping google-shopping-merchant-issue-resolution - 0.5.0 + 0.6.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.shopping:google-shopping-merchant-issue-resolution:0.5.0' +implementation 'com.google.shopping:google-shopping-merchant-issue-resolution:0.6.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.shopping" % "google-shopping-merchant-issue-resolution" % "0.5.0" +libraryDependencies += "com.google.shopping" % "google-shopping-merchant-issue-resolution" % "0.6.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.shopping/google-shopping-merchant-issue-resolution.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-issue-resolution/0.5.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.shopping/google-shopping-merchant-issue-resolution/0.6.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-monitoring/README.md b/java-monitoring/README.md index 77cbbec90f3d..8272d381bc00 100644 --- a/java-monitoring/README.md +++ b/java-monitoring/README.md @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-monitoring - 3.64.0 + 3.67.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-monitoring:3.64.0' +implementation 'com.google.cloud:google-cloud-monitoring:3.67.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.64.0" +libraryDependencies += "com.google.cloud" % "google-cloud-monitoring" % "3.67.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-monitoring.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring/3.64.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-monitoring/3.67.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-networkservices/README.md b/java-networkservices/README.md index b7da4cbe562d..aeb6a8159dd6 100644 --- a/java-networkservices/README.md +++ b/java-networkservices/README.md @@ -45,20 +45,20 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-networkservices - 0.21.0 + 0.22.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-networkservices:0.21.0' +implementation 'com.google.cloud:google-cloud-networkservices:0.22.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-networkservices" % "0.21.0" +libraryDependencies += "com.google.cloud" % "google-cloud-networkservices" % "0.22.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-networkservices.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkservices/0.21.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-networkservices/0.22.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-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceClient.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceClient.java index 6681879f11db..1db2ac0ee6af 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceClient.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceClient.java @@ -275,6 +275,104 @@ * * * + *

ListAuthzExtensions + *

Lists `AuthzExtension` resources in a given project and location. + * + *

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

+ *
    + *
  • listAuthzExtensions(ListAuthzExtensionsRequest request) + *

+ *

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

+ *
    + *
  • listAuthzExtensions(LocationName parent) + *

  • listAuthzExtensions(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.

+ *
    + *
  • listAuthzExtensionsPagedCallable() + *

  • listAuthzExtensionsCallable() + *

+ * + * + * + *

GetAuthzExtension + *

Gets details of the specified `AuthzExtension` resource. + * + *

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

+ *
    + *
  • getAuthzExtension(GetAuthzExtensionRequest request) + *

+ *

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

+ *
    + *
  • getAuthzExtension(AuthzExtensionName name) + *

  • getAuthzExtension(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.

+ *
    + *
  • getAuthzExtensionCallable() + *

+ * + * + * + *

CreateAuthzExtension + *

Creates a new `AuthzExtension` resource in a given project and location. + * + *

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

+ *
    + *
  • createAuthzExtensionAsync(CreateAuthzExtensionRequest request) + *

+ *

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

+ *
    + *
  • createAuthzExtensionAsync(LocationName parent, AuthzExtension authzExtension, String authzExtensionId) + *

  • createAuthzExtensionAsync(String parent, AuthzExtension authzExtension, String authzExtensionId) + *

+ *

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

+ *
    + *
  • createAuthzExtensionOperationCallable() + *

  • createAuthzExtensionCallable() + *

+ * + * + * + *

UpdateAuthzExtension + *

Updates the parameters of the specified `AuthzExtension` resource. + * + *

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

+ *
    + *
  • updateAuthzExtensionAsync(UpdateAuthzExtensionRequest request) + *

+ *

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

+ *
    + *
  • updateAuthzExtensionAsync(AuthzExtension authzExtension, 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.

+ *
    + *
  • updateAuthzExtensionOperationCallable() + *

  • updateAuthzExtensionCallable() + *

+ * + * + * + *

DeleteAuthzExtension + *

Deletes the specified `AuthzExtension` resource. + * + *

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

+ *
    + *
  • deleteAuthzExtensionAsync(DeleteAuthzExtensionRequest request) + *

+ *

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

+ *
    + *
  • deleteAuthzExtensionAsync(AuthzExtensionName name) + *

  • deleteAuthzExtensionAsync(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.

+ *
    + *
  • deleteAuthzExtensionOperationCallable() + *

  • deleteAuthzExtensionCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -496,7 +594,8 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param parent Required. The project and location from which the `LbTrafficExtension` resources - * are listed, specified in the following format: `projects/{project}/locations/{location}`. + * are listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(LocationName parent) { @@ -529,7 +628,8 @@ public final ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(Locati * } * * @param parent Required. The project and location from which the `LbTrafficExtension` resources - * are listed, specified in the following format: `projects/{project}/locations/{location}`. + * are listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(String parent) { @@ -973,7 +1073,7 @@ public final OperationFuture createLbTraf * * @param lbTrafficExtension Required. `LbTrafficExtension` resource being updated. * @param updateMask Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. The fields specified in the update_mask are + * `LbTrafficExtension` resource by the update. The fields specified in the `update_mask` are * relative to the resource, not the full request. A field is overwritten if it is in the * mask. If the user does not specify a mask, then all fields are overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1263,7 +1363,8 @@ public final OperationFuture deleteLbTrafficExtensionA * } * * @param parent Required. The project and location from which the `LbRouteExtension` resources - * are listed, specified in the following format: `projects/{project}/locations/{location}`. + * are listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbRouteExtensionsPagedResponse listLbRouteExtensions(LocationName parent) { @@ -1295,7 +1396,8 @@ public final ListLbRouteExtensionsPagedResponse listLbRouteExtensions(LocationNa * } * * @param parent Required. The project and location from which the `LbRouteExtension` resources - * are listed, specified in the following format: `projects/{project}/locations/{location}`. + * are listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListLbRouteExtensionsPagedResponse listLbRouteExtensions(String parent) { @@ -1738,7 +1840,7 @@ public final OperationFuture createLbRouteE * * @param lbRouteExtension Required. `LbRouteExtension` resource being updated. * @param updateMask Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. The fields specified in the update_mask are + * `LbRouteExtension` resource by the update. The fields specified in the `update_mask` are * relative to the resource, not the full request. A field is overwritten if it is in the * mask. If the user does not specify a mask, then all fields are overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2005,7 +2107,7 @@ public final OperationFuture deleteLbRouteExtensionAsy // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Lists `AuthzExtension` resources in a given project and location. * *

Sample code: * @@ -2016,14 +2118,79 @@ public final OperationFuture deleteLbRouteExtensionAsy * // - 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. The project and location from which the `AuthzExtension` resources are + * listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAuthzExtensionsPagedResponse listAuthzExtensions(LocationName parent) { + ListAuthzExtensionsRequest request = + ListAuthzExtensionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAuthzExtensions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `AuthzExtension` resources 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the `AuthzExtension` resources are + * listed. These values are specified in the following format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAuthzExtensionsPagedResponse listAuthzExtensions(String parent) { + ListAuthzExtensionsRequest request = + ListAuthzExtensionsRequest.newBuilder().setParent(parent).build(); + return listAuthzExtensions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `AuthzExtension` resources 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   ListAuthzExtensionsRequest request =
+   *       ListAuthzExtensionsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
    *           .setPageSize(883849137)
    *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
    *           .build();
-   *   for (Location element : depServiceClient.listLocations(request).iterateAll()) {
+   *   for (AuthzExtension element : depServiceClient.listAuthzExtensions(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -2032,13 +2199,14 @@ public final OperationFuture deleteLbRouteExtensionAsy
    * @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 ListAuthzExtensionsPagedResponse listAuthzExtensions(
+      ListAuthzExtensionsRequest request) {
+    return listAuthzExtensionsPagedCallable().call(request);
   }
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists information about the supported locations for this service.
+   * Lists `AuthzExtension` resources in a given project and location.
    *
    * 

Sample code: * @@ -2049,30 +2217,31 @@ 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAuthzExtensionsRequest request = + * ListAuthzExtensionsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") * .build(); - * ApiFuture future = - * depServiceClient.listLocationsPagedCallable().futureCall(request); + * ApiFuture future = + * depServiceClient.listAuthzExtensionsPagedCallable().futureCall(request); * // Do something. - * for (Location element : future.get().iterateAll()) { + * for (AuthzExtension element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * }

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

Sample code: * @@ -2083,16 +2252,18 @@ 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAuthzExtensionsRequest request = + * ListAuthzExtensionsRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") * .build(); * while (true) { - * ListLocationsResponse response = depServiceClient.listLocationsCallable().call(request); - * for (Location element : response.getLocationsList()) { + * ListAuthzExtensionsResponse response = + * depServiceClient.listAuthzExtensionsCallable().call(request); + * for (AuthzExtension element : response.getAuthzExtensionsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -2105,13 +2276,14 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * } * } */ - public final UnaryCallable listLocationsCallable() { - return stub.listLocationsCallable(); + public final UnaryCallable + listAuthzExtensionsCallable() { + return stub.listAuthzExtensionsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of the specified `AuthzExtension` resource. * *

Sample code: * @@ -2122,21 +2294,27 @@ 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * Location response = depServiceClient.getLocation(request); + * AuthzExtensionName name = + * AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + * AuthzExtension response = depServiceClient.getAuthzExtension(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. A name of the `AuthzExtension` resource to get. Must be in the format + * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Location getLocation(GetLocationRequest request) { - return getLocationCallable().call(request); + public final AuthzExtension getAuthzExtension(AuthzExtensionName name) { + GetAuthzExtensionRequest request = + GetAuthzExtensionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAuthzExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of the specified `AuthzExtension` resource. * *

Sample code: * @@ -2147,22 +2325,24 @@ 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * ApiFuture future = depServiceClient.getLocationCallable().futureCall(request); - * // Do something. - * Location response = future.get(); + * String name = + * AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString(); + * AuthzExtension response = depServiceClient.getAuthzExtension(name); * } * } + * + * @param name Required. A name of the `AuthzExtension` resource to get. Must be in the format + * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); + public final AuthzExtension getAuthzExtension(String name) { + GetAuthzExtensionRequest request = GetAuthzExtensionRequest.newBuilder().setName(name).build(); + return getAuthzExtension(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * Gets details of the specified `AuthzExtension` resource. * *

Sample code: * @@ -2173,29 +2353,25 @@ public final UnaryCallable getLocationCallable() { * // - 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * SetIamPolicyRequest request = - * SetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setPolicy(Policy.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAuthzExtensionRequest request = + * GetAuthzExtensionRequest.newBuilder() + * .setName( + * AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) * .build(); - * Policy response = depServiceClient.setIamPolicy(request); + * AuthzExtension response = depServiceClient.getAuthzExtension(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); + public final AuthzExtension getAuthzExtension(GetAuthzExtensionRequest request) { + return getAuthzExtensionCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * Gets details of the specified `AuthzExtension` resource. * *

Sample code: * @@ -2206,27 +2382,25 @@ public final Policy setIamPolicy(SetIamPolicyRequest 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * SetIamPolicyRequest request = - * SetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setPolicy(Policy.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAuthzExtensionRequest request = + * GetAuthzExtensionRequest.newBuilder() + * .setName( + * AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) * .build(); - * ApiFuture future = depServiceClient.setIamPolicyCallable().futureCall(request); + * ApiFuture future = + * depServiceClient.getAuthzExtensionCallable().futureCall(request); * // Do something. - * Policy response = future.get(); + * AuthzExtension response = future.get(); * } * } */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); + public final UnaryCallable getAuthzExtensionCallable() { + return stub.getAuthzExtensionCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. + * Creates a new `AuthzExtension` resource in a given project and location. * *

Sample code: * @@ -2237,27 +2411,37 @@ public final UnaryCallable setIamPolicyCallable() { * // - 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * GetIamPolicyRequest request = - * GetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setOptions(GetPolicyOptions.newBuilder().build()) - * .build(); - * Policy response = depServiceClient.getIamPolicy(request); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + * String authzExtensionId = "authzExtensionId-973067640"; + * AuthzExtension response = + * depServiceClient + * .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) + * .get(); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent resource of the `AuthzExtension` resource. Must be in the + * format `projects/{project}/locations/{location}`. + * @param authzExtension Required. `AuthzExtension` resource to be created. + * @param authzExtensionId Required. User-provided ID of the `AuthzExtension` resource to be + * created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); + public final OperationFuture createAuthzExtensionAsync( + LocationName parent, AuthzExtension authzExtension, String authzExtensionId) { + CreateAuthzExtensionRequest request = + CreateAuthzExtensionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAuthzExtension(authzExtension) + .setAuthzExtensionId(authzExtensionId) + .build(); + return createAuthzExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. + * Creates a new `AuthzExtension` resource in a given project and location. * *

Sample code: * @@ -2268,30 +2452,37 @@ public final Policy getIamPolicy(GetIamPolicyRequest 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * GetIamPolicyRequest request = - * GetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setOptions(GetPolicyOptions.newBuilder().build()) - * .build(); - * ApiFuture future = depServiceClient.getIamPolicyCallable().futureCall(request); - * // Do something. - * Policy response = future.get(); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + * String authzExtensionId = "authzExtensionId-973067640"; + * AuthzExtension response = + * depServiceClient + * .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) + * .get(); * } * } + * + * @param parent Required. The parent resource of the `AuthzExtension` resource. Must be in the + * format `projects/{project}/locations/{location}`. + * @param authzExtension Required. `AuthzExtension` resource to be created. + * @param authzExtensionId Required. User-provided ID of the `AuthzExtension` resource to be + * created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); + public final OperationFuture createAuthzExtensionAsync( + String parent, AuthzExtension authzExtension, String authzExtensionId) { + CreateAuthzExtensionRequest request = + CreateAuthzExtensionRequest.newBuilder() + .setParent(parent) + .setAuthzExtension(authzExtension) + .setAuthzExtensionId(authzExtensionId) + .build(); + return createAuthzExtensionAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. + * Creates a new `AuthzExtension` resource in a given project and location. * *

Sample code: * @@ -2302,31 +2493,697 @@ public final UnaryCallable getIamPolicyCallable() { * // - 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { - * TestIamPermissionsRequest request = - * TestIamPermissionsRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .addAllPermissions(new ArrayList()) + * CreateAuthzExtensionRequest request = + * CreateAuthzExtensionRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setAuthzExtensionId("authzExtensionId-973067640") + * .setAuthzExtension(AuthzExtension.newBuilder().build()) + * .setRequestId("requestId693933066") * .build(); - * TestIamPermissionsResponse response = depServiceClient.testIamPermissions(request); + * AuthzExtension response = depServiceClient.createAuthzExtensionAsync(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { - return testIamPermissionsCallable().call(request); + public final OperationFuture createAuthzExtensionAsync( + CreateAuthzExtensionRequest request) { + return createAuthzExtensionOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. + * Creates a new `AuthzExtension` resource 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   CreateAuthzExtensionRequest request =
+   *       CreateAuthzExtensionRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAuthzExtensionId("authzExtensionId-973067640")
+   *           .setAuthzExtension(AuthzExtension.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       depServiceClient.createAuthzExtensionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AuthzExtension response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createAuthzExtensionOperationCallable() { + return stub.createAuthzExtensionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `AuthzExtension` resource 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   CreateAuthzExtensionRequest request =
+   *       CreateAuthzExtensionRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setAuthzExtensionId("authzExtensionId-973067640")
+   *           .setAuthzExtension(AuthzExtension.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       depServiceClient.createAuthzExtensionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAuthzExtensionCallable() { + return stub.createAuthzExtensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   AuthzExtension authzExtension = AuthzExtension.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AuthzExtension response =
+   *       depServiceClient.updateAuthzExtensionAsync(authzExtension, updateMask).get();
+   * }
+   * }
+ * + * @param authzExtension Required. `AuthzExtension` resource being updated. + * @param updateMask Required. Used to specify the fields to be overwritten in the + * `AuthzExtension` resource by the update. The fields specified in the `update_mask` are + * relative to the resource, not the full request. A field is overwritten if it is in the + * mask. If the user does not specify a mask, then all fields are overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAuthzExtensionAsync( + AuthzExtension authzExtension, FieldMask updateMask) { + UpdateAuthzExtensionRequest request = + UpdateAuthzExtensionRequest.newBuilder() + .setAuthzExtension(authzExtension) + .setUpdateMask(updateMask) + .build(); + return updateAuthzExtensionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   UpdateAuthzExtensionRequest request =
+   *       UpdateAuthzExtensionRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAuthzExtension(AuthzExtension.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AuthzExtension response = depServiceClient.updateAuthzExtensionAsync(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 updateAuthzExtensionAsync( + UpdateAuthzExtensionRequest request) { + return updateAuthzExtensionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   UpdateAuthzExtensionRequest request =
+   *       UpdateAuthzExtensionRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAuthzExtension(AuthzExtension.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       depServiceClient.updateAuthzExtensionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AuthzExtension response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateAuthzExtensionOperationCallable() { + return stub.updateAuthzExtensionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   UpdateAuthzExtensionRequest request =
+   *       UpdateAuthzExtensionRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAuthzExtension(AuthzExtension.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       depServiceClient.updateAuthzExtensionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAuthzExtensionCallable() { + return stub.updateAuthzExtensionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   AuthzExtensionName name =
+   *       AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]");
+   *   depServiceClient.deleteAuthzExtensionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `AuthzExtension` resource to delete. Must be in the + * format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAuthzExtensionAsync( + AuthzExtensionName name) { + DeleteAuthzExtensionRequest request = + DeleteAuthzExtensionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAuthzExtensionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   String name =
+   *       AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString();
+   *   depServiceClient.deleteAuthzExtensionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `AuthzExtension` resource to delete. Must be in the + * format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAuthzExtensionAsync(String name) { + DeleteAuthzExtensionRequest request = + DeleteAuthzExtensionRequest.newBuilder().setName(name).build(); + return deleteAuthzExtensionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   DeleteAuthzExtensionRequest request =
+   *       DeleteAuthzExtensionRequest.newBuilder()
+   *           .setName(
+   *               AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   depServiceClient.deleteAuthzExtensionAsync(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 deleteAuthzExtensionAsync( + DeleteAuthzExtensionRequest request) { + return deleteAuthzExtensionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   DeleteAuthzExtensionRequest request =
+   *       DeleteAuthzExtensionRequest.newBuilder()
+   *           .setName(
+   *               AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       depServiceClient.deleteAuthzExtensionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAuthzExtensionOperationCallable() { + return stub.deleteAuthzExtensionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `AuthzExtension` resource. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   DeleteAuthzExtensionRequest request =
+   *       DeleteAuthzExtensionRequest.newBuilder()
+   *           .setName(
+   *               AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       depServiceClient.deleteAuthzExtensionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteAuthzExtensionCallable() { + return stub.deleteAuthzExtensionCallable(); + } + + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : depServiceClient.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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       depServiceClient.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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = depServiceClient.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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = depServiceClient.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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = depServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = depServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = depServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = depServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = depServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = depServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. * *

Sample code: * @@ -2557,6 +3414,90 @@ protected ListLbRouteExtensionsFixedSizeCollection createCollection( } } + public static class ListAuthzExtensionsPagedResponse + extends AbstractPagedListResponse< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + AuthzExtension, + ListAuthzExtensionsPage, + ListAuthzExtensionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAuthzExtensionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAuthzExtensionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAuthzExtensionsPagedResponse(ListAuthzExtensionsPage page) { + super(page, ListAuthzExtensionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAuthzExtensionsPage + extends AbstractPage< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + AuthzExtension, + ListAuthzExtensionsPage> { + + private ListAuthzExtensionsPage( + PageContext + context, + ListAuthzExtensionsResponse response) { + super(context, response); + } + + private static ListAuthzExtensionsPage createEmptyPage() { + return new ListAuthzExtensionsPage(null, null); + } + + @Override + protected ListAuthzExtensionsPage createPage( + PageContext + context, + ListAuthzExtensionsResponse response) { + return new ListAuthzExtensionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAuthzExtensionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + AuthzExtension, + ListAuthzExtensionsPage, + ListAuthzExtensionsFixedSizeCollection> { + + private ListAuthzExtensionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAuthzExtensionsFixedSizeCollection createEmptyCollection() { + return new ListAuthzExtensionsFixedSizeCollection(null, 0); + } + + @Override + protected ListAuthzExtensionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAuthzExtensionsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceSettings.java index d26486882d24..606a74d02fb2 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/DepServiceSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -231,6 +232,51 @@ public class DepServiceSettings extends ClientSettings { return ((DepServiceStubSettings) getStubSettings()).deleteLbRouteExtensionOperationSettings(); } + /** Returns the object with the settings used for calls to listAuthzExtensions. */ + public PagedCallSettings< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings() { + return ((DepServiceStubSettings) getStubSettings()).listAuthzExtensionsSettings(); + } + + /** Returns the object with the settings used for calls to getAuthzExtension. */ + public UnaryCallSettings getAuthzExtensionSettings() { + return ((DepServiceStubSettings) getStubSettings()).getAuthzExtensionSettings(); + } + + /** Returns the object with the settings used for calls to createAuthzExtension. */ + public UnaryCallSettings createAuthzExtensionSettings() { + return ((DepServiceStubSettings) getStubSettings()).createAuthzExtensionSettings(); + } + + /** Returns the object with the settings used for calls to createAuthzExtension. */ + public OperationCallSettings + createAuthzExtensionOperationSettings() { + return ((DepServiceStubSettings) getStubSettings()).createAuthzExtensionOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAuthzExtension. */ + public UnaryCallSettings updateAuthzExtensionSettings() { + return ((DepServiceStubSettings) getStubSettings()).updateAuthzExtensionSettings(); + } + + /** Returns the object with the settings used for calls to updateAuthzExtension. */ + public OperationCallSettings + updateAuthzExtensionOperationSettings() { + return ((DepServiceStubSettings) getStubSettings()).updateAuthzExtensionOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAuthzExtension. */ + public UnaryCallSettings deleteAuthzExtensionSettings() { + return ((DepServiceStubSettings) getStubSettings()).deleteAuthzExtensionSettings(); + } + + /** Returns the object with the settings used for calls to deleteAuthzExtension. */ + public OperationCallSettings + deleteAuthzExtensionOperationSettings() { + return ((DepServiceStubSettings) getStubSettings()).deleteAuthzExtensionOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -475,6 +521,59 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deleteLbRouteExtensionOperationSettings(); } + /** Returns the builder for the settings used for calls to listAuthzExtensions. */ + public PagedCallSettings.Builder< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings() { + return getStubSettingsBuilder().listAuthzExtensionsSettings(); + } + + /** Returns the builder for the settings used for calls to getAuthzExtension. */ + public UnaryCallSettings.Builder + getAuthzExtensionSettings() { + return getStubSettingsBuilder().getAuthzExtensionSettings(); + } + + /** Returns the builder for the settings used for calls to createAuthzExtension. */ + public UnaryCallSettings.Builder + createAuthzExtensionSettings() { + return getStubSettingsBuilder().createAuthzExtensionSettings(); + } + + /** Returns the builder for the settings used for calls to createAuthzExtension. */ + public OperationCallSettings.Builder< + CreateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + createAuthzExtensionOperationSettings() { + return getStubSettingsBuilder().createAuthzExtensionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAuthzExtension. */ + public UnaryCallSettings.Builder + updateAuthzExtensionSettings() { + return getStubSettingsBuilder().updateAuthzExtensionSettings(); + } + + /** Returns the builder for the settings used for calls to updateAuthzExtension. */ + public OperationCallSettings.Builder< + UpdateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + updateAuthzExtensionOperationSettings() { + return getStubSettingsBuilder().updateAuthzExtensionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAuthzExtension. */ + public UnaryCallSettings.Builder + deleteAuthzExtensionSettings() { + return getStubSettingsBuilder().deleteAuthzExtensionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAuthzExtension. */ + public OperationCallSettings.Builder + deleteAuthzExtensionOperationSettings() { + return getStubSettingsBuilder().deleteAuthzExtensionOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java index 7e078c3d7dbd..4d8491337306 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java @@ -178,6 +178,183 @@ * * * + *

ListWasmPluginVersions + *

Lists `WasmPluginVersion` resources in a given project and location. + * + *

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

+ *
    + *
  • listWasmPluginVersions(ListWasmPluginVersionsRequest request) + *

+ *

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

+ *
    + *
  • listWasmPluginVersions(WasmPluginName parent) + *

  • listWasmPluginVersions(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.

+ *
    + *
  • listWasmPluginVersionsPagedCallable() + *

  • listWasmPluginVersionsCallable() + *

+ * + * + * + *

GetWasmPluginVersion + *

Gets details of the specified `WasmPluginVersion` resource. + * + *

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

+ *
    + *
  • getWasmPluginVersion(GetWasmPluginVersionRequest request) + *

+ *

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

+ *
    + *
  • getWasmPluginVersion(WasmPluginVersionName name) + *

  • getWasmPluginVersion(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.

+ *
    + *
  • getWasmPluginVersionCallable() + *

+ * + * + * + *

CreateWasmPluginVersion + *

Creates a new `WasmPluginVersion` resource in a given project and location. + * + *

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

+ *
    + *
  • createWasmPluginVersionAsync(CreateWasmPluginVersionRequest request) + *

+ *

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

+ *
    + *
  • createWasmPluginVersionAsync(WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) + *

  • createWasmPluginVersionAsync(String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) + *

+ *

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

+ *
    + *
  • createWasmPluginVersionOperationCallable() + *

  • createWasmPluginVersionCallable() + *

+ * + * + * + *

DeleteWasmPluginVersion + *

Deletes the specified `WasmPluginVersion` resource. + * + *

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

+ *
    + *
  • deleteWasmPluginVersionAsync(DeleteWasmPluginVersionRequest request) + *

+ *

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

+ *
    + *
  • deleteWasmPluginVersionAsync(WasmPluginVersionName name) + *

  • deleteWasmPluginVersionAsync(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.

+ *
    + *
  • deleteWasmPluginVersionOperationCallable() + *

  • deleteWasmPluginVersionCallable() + *

+ * + * + * + *

ListWasmPlugins + *

Lists `WasmPlugin` resources in a given project and location. + * + *

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

+ *
    + *
  • listWasmPlugins(ListWasmPluginsRequest request) + *

+ *

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

+ *
    + *
  • listWasmPlugins(LocationName parent) + *

  • listWasmPlugins(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.

+ *
    + *
  • listWasmPluginsPagedCallable() + *

  • listWasmPluginsCallable() + *

+ * + * + * + *

GetWasmPlugin + *

Gets details of the specified `WasmPlugin` resource. + * + *

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

+ *
    + *
  • getWasmPlugin(GetWasmPluginRequest request) + *

+ *

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

+ *
    + *
  • getWasmPlugin(WasmPluginName name) + *

  • getWasmPlugin(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.

+ *
    + *
  • getWasmPluginCallable() + *

+ * + * + * + *

CreateWasmPlugin + *

Creates a new `WasmPlugin` resource in a given project and location. + * + *

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

+ *
    + *
  • createWasmPluginAsync(CreateWasmPluginRequest request) + *

+ *

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

+ *
    + *
  • createWasmPluginAsync(LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId) + *

  • createWasmPluginAsync(String parent, WasmPlugin wasmPlugin, String wasmPluginId) + *

+ *

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

+ *
    + *
  • createWasmPluginOperationCallable() + *

  • createWasmPluginCallable() + *

+ * + * + * + *

UpdateWasmPlugin + *

Updates the parameters of the specified `WasmPlugin` resource. + * + *

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

+ *
    + *
  • updateWasmPluginAsync(UpdateWasmPluginRequest request) + *

+ *

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

+ *
    + *
  • updateWasmPluginAsync(WasmPlugin wasmPlugin, 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.

+ *
    + *
  • updateWasmPluginOperationCallable() + *

  • updateWasmPluginCallable() + *

+ * + * + * + *

DeleteWasmPlugin + *

Deletes the specified `WasmPlugin` resource. + * + *

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

+ *
    + *
  • deleteWasmPluginAsync(DeleteWasmPluginRequest request) + *

+ *

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

+ *
    + *
  • deleteWasmPluginAsync(WasmPluginName name) + *

  • deleteWasmPluginAsync(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.

+ *
    + *
  • deleteWasmPluginOperationCallable() + *

  • deleteWasmPluginCallable() + *

+ * + * + * *

ListGateways *

Lists Gateways in a given project and location. * @@ -1452,7 +1629,1378 @@ public final EndpointPolicy getEndpointPolicy(EndpointPolicyName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets details of a single EndpointPolicy. + * Gets details of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String name =
+   *       EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString();
+   *   EndpointPolicy response = networkServicesClient.getEndpointPolicy(name);
+   * }
+   * }
+ * + * @param name Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final EndpointPolicy getEndpointPolicy(String name) { + GetEndpointPolicyRequest request = GetEndpointPolicyRequest.newBuilder().setName(name).build(); + return getEndpointPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   GetEndpointPolicyRequest request =
+   *       GetEndpointPolicyRequest.newBuilder()
+   *           .setName(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .build();
+   *   EndpointPolicy response = networkServicesClient.getEndpointPolicy(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 EndpointPolicy getEndpointPolicy(GetEndpointPolicyRequest request) { + return getEndpointPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   GetEndpointPolicyRequest request =
+   *       GetEndpointPolicyRequest.newBuilder()
+   *           .setName(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.getEndpointPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   EndpointPolicy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEndpointPolicyCallable() { + return stub.getEndpointPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new EndpointPolicy 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
+   *   String endpointPolicyId = "endpointPolicyId-509458782";
+   *   EndpointPolicy response =
+   *       networkServicesClient
+   *           .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format + * `projects/*/locations/global`. + * @param endpointPolicy Required. EndpointPolicy resource to be created. + * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. + * "CustomECS". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEndpointPolicyAsync( + LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId) { + CreateEndpointPolicyRequest request = + CreateEndpointPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEndpointPolicy(endpointPolicy) + .setEndpointPolicyId(endpointPolicyId) + .build(); + return createEndpointPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new EndpointPolicy 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
+   *   String endpointPolicyId = "endpointPolicyId-509458782";
+   *   EndpointPolicy response =
+   *       networkServicesClient
+   *           .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format + * `projects/*/locations/global`. + * @param endpointPolicy Required. EndpointPolicy resource to be created. + * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. + * "CustomECS". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEndpointPolicyAsync( + String parent, EndpointPolicy endpointPolicy, String endpointPolicyId) { + CreateEndpointPolicyRequest request = + CreateEndpointPolicyRequest.newBuilder() + .setParent(parent) + .setEndpointPolicy(endpointPolicy) + .setEndpointPolicyId(endpointPolicyId) + .build(); + return createEndpointPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new EndpointPolicy 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateEndpointPolicyRequest request =
+   *       CreateEndpointPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpointPolicyId("endpointPolicyId-509458782")
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   EndpointPolicy response = networkServicesClient.createEndpointPolicyAsync(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 createEndpointPolicyAsync( + CreateEndpointPolicyRequest request) { + return createEndpointPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new EndpointPolicy 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateEndpointPolicyRequest request =
+   *       CreateEndpointPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpointPolicyId("endpointPolicyId-509458782")
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       networkServicesClient.createEndpointPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   EndpointPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createEndpointPolicyOperationCallable() { + return stub.createEndpointPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new EndpointPolicy 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateEndpointPolicyRequest request =
+   *       CreateEndpointPolicyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setEndpointPolicyId("endpointPolicyId-509458782")
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.createEndpointPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createEndpointPolicyCallable() { + return stub.createEndpointPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   EndpointPolicy response =
+   *       networkServicesClient.updateEndpointPolicyAsync(endpointPolicy, updateMask).get();
+   * }
+   * }
+ * + * @param endpointPolicy Required. Updated EndpointPolicy resource. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEndpointPolicyAsync( + EndpointPolicy endpointPolicy, FieldMask updateMask) { + UpdateEndpointPolicyRequest request = + UpdateEndpointPolicyRequest.newBuilder() + .setEndpointPolicy(endpointPolicy) + .setUpdateMask(updateMask) + .build(); + return updateEndpointPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   UpdateEndpointPolicyRequest request =
+   *       UpdateEndpointPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   EndpointPolicy response = networkServicesClient.updateEndpointPolicyAsync(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 updateEndpointPolicyAsync( + UpdateEndpointPolicyRequest request) { + return updateEndpointPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   UpdateEndpointPolicyRequest request =
+   *       UpdateEndpointPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       networkServicesClient.updateEndpointPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   EndpointPolicy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateEndpointPolicyOperationCallable() { + return stub.updateEndpointPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   UpdateEndpointPolicyRequest request =
+   *       UpdateEndpointPolicyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setEndpointPolicy(EndpointPolicy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.updateEndpointPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateEndpointPolicyCallable() { + return stub.updateEndpointPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   EndpointPolicyName name =
+   *       EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
+   *   networkServicesClient.deleteEndpointPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEndpointPolicyAsync( + EndpointPolicyName name) { + DeleteEndpointPolicyRequest request = + DeleteEndpointPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteEndpointPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String name =
+   *       EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString();
+   *   networkServicesClient.deleteEndpointPolicyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEndpointPolicyAsync(String name) { + DeleteEndpointPolicyRequest request = + DeleteEndpointPolicyRequest.newBuilder().setName(name).build(); + return deleteEndpointPolicyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteEndpointPolicyRequest request =
+   *       DeleteEndpointPolicyRequest.newBuilder()
+   *           .setName(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .build();
+   *   networkServicesClient.deleteEndpointPolicyAsync(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 deleteEndpointPolicyAsync( + DeleteEndpointPolicyRequest request) { + return deleteEndpointPolicyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteEndpointPolicyRequest request =
+   *       DeleteEndpointPolicyRequest.newBuilder()
+   *           .setName(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       networkServicesClient.deleteEndpointPolicyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteEndpointPolicyOperationCallable() { + return stub.deleteEndpointPolicyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single EndpointPolicy. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteEndpointPolicyRequest request =
+   *       DeleteEndpointPolicyRequest.newBuilder()
+   *           .setName(
+   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.deleteEndpointPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteEndpointPolicyCallable() { + return stub.deleteEndpointPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPluginVersion` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
+   *   for (WasmPluginVersion element :
+   *       networkServicesClient.listWasmPluginVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, + * specified in the following format: + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWasmPluginVersionsPagedResponse listWasmPluginVersions(WasmPluginName parent) { + ListWasmPluginVersionsRequest request = + ListWasmPluginVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listWasmPluginVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPluginVersion` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
+   *   for (WasmPluginVersion element :
+   *       networkServicesClient.listWasmPluginVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, + * specified in the following format: + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWasmPluginVersionsPagedResponse listWasmPluginVersions(String parent) { + ListWasmPluginVersionsRequest request = + ListWasmPluginVersionsRequest.newBuilder().setParent(parent).build(); + return listWasmPluginVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPluginVersion` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginVersionsRequest request =
+   *       ListWasmPluginVersionsRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (WasmPluginVersion element :
+   *       networkServicesClient.listWasmPluginVersions(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 ListWasmPluginVersionsPagedResponse listWasmPluginVersions( + ListWasmPluginVersionsRequest request) { + return listWasmPluginVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPluginVersion` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginVersionsRequest request =
+   *       ListWasmPluginVersionsRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.listWasmPluginVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (WasmPluginVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listWasmPluginVersionsPagedCallable() { + return stub.listWasmPluginVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPluginVersion` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginVersionsRequest request =
+   *       ListWasmPluginVersionsRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListWasmPluginVersionsResponse response =
+   *         networkServicesClient.listWasmPluginVersionsCallable().call(request);
+   *     for (WasmPluginVersion element : response.getWasmPluginVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listWasmPluginVersionsCallable() { + return stub.listWasmPluginVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   WasmPluginVersionName name =
+   *       WasmPluginVersionName.of(
+   *           "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]");
+   *   WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name);
+   * }
+   * }
+ * + * @param name Required. A name of the `WasmPluginVersion` resource to get. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final WasmPluginVersion getWasmPluginVersion(WasmPluginVersionName name) { + GetWasmPluginVersionRequest request = + GetWasmPluginVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getWasmPluginVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String name =
+   *       WasmPluginVersionName.of(
+   *               "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *           .toString();
+   *   WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name);
+   * }
+   * }
+ * + * @param name Required. A name of the `WasmPluginVersion` resource to get. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final WasmPluginVersion getWasmPluginVersion(String name) { + GetWasmPluginVersionRequest request = + GetWasmPluginVersionRequest.newBuilder().setName(name).build(); + return getWasmPluginVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   GetWasmPluginVersionRequest request =
+   *       GetWasmPluginVersionRequest.newBuilder()
+   *           .setName(
+   *               WasmPluginVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *                   .toString())
+   *           .build();
+   *   WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(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 WasmPluginVersion getWasmPluginVersion(GetWasmPluginVersionRequest request) { + return getWasmPluginVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   GetWasmPluginVersionRequest request =
+   *       GetWasmPluginVersionRequest.newBuilder()
+   *           .setName(
+   *               WasmPluginVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.getWasmPluginVersionCallable().futureCall(request);
+   *   // Do something.
+   *   WasmPluginVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getWasmPluginVersionCallable() { + return stub.getWasmPluginVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `WasmPluginVersion` resource 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
+   *   WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build();
+   *   String wasmPluginVersionId = "wasmPluginVersionId38892252";
+   *   WasmPluginVersion response =
+   *       networkServicesClient
+   *           .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the `WasmPluginVersion` resource. Must be in the + * format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + * @param wasmPluginVersion Required. `WasmPluginVersion` resource to be created. + * @param wasmPluginVersionId Required. User-provided ID of the `WasmPluginVersion` resource to be + * created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createWasmPluginVersionAsync( + WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) { + CreateWasmPluginVersionRequest request = + CreateWasmPluginVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setWasmPluginVersion(wasmPluginVersion) + .setWasmPluginVersionId(wasmPluginVersionId) + .build(); + return createWasmPluginVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `WasmPluginVersion` resource 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
+   *   WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build();
+   *   String wasmPluginVersionId = "wasmPluginVersionId38892252";
+   *   WasmPluginVersion response =
+   *       networkServicesClient
+   *           .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource of the `WasmPluginVersion` resource. Must be in the + * format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + * @param wasmPluginVersion Required. `WasmPluginVersion` resource to be created. + * @param wasmPluginVersionId Required. User-provided ID of the `WasmPluginVersion` resource to be + * created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createWasmPluginVersionAsync( + String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) { + CreateWasmPluginVersionRequest request = + CreateWasmPluginVersionRequest.newBuilder() + .setParent(parent) + .setWasmPluginVersion(wasmPluginVersion) + .setWasmPluginVersionId(wasmPluginVersionId) + .build(); + return createWasmPluginVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `WasmPluginVersion` resource 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateWasmPluginVersionRequest request =
+   *       CreateWasmPluginVersionRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setWasmPluginVersionId("wasmPluginVersionId38892252")
+   *           .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
+   *           .build();
+   *   WasmPluginVersion response =
+   *       networkServicesClient.createWasmPluginVersionAsync(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 createWasmPluginVersionAsync( + CreateWasmPluginVersionRequest request) { + return createWasmPluginVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `WasmPluginVersion` resource 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateWasmPluginVersionRequest request =
+   *       CreateWasmPluginVersionRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setWasmPluginVersionId("wasmPluginVersionId38892252")
+   *           .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       networkServicesClient.createWasmPluginVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   WasmPluginVersion response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationCallable() { + return stub.createWasmPluginVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new `WasmPluginVersion` resource 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   CreateWasmPluginVersionRequest request =
+   *       CreateWasmPluginVersionRequest.newBuilder()
+   *           .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
+   *           .setWasmPluginVersionId("wasmPluginVersionId38892252")
+   *           .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.createWasmPluginVersionCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createWasmPluginVersionCallable() { + return stub.createWasmPluginVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   WasmPluginVersionName name =
+   *       WasmPluginVersionName.of(
+   *           "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]");
+   *   networkServicesClient.deleteWasmPluginVersionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the `WasmPluginVersion` resource to delete. Must be in the + * format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteWasmPluginVersionAsync( + WasmPluginVersionName name) { + DeleteWasmPluginVersionRequest request = + DeleteWasmPluginVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteWasmPluginVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String name =
+   *       WasmPluginVersionName.of(
+   *               "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *           .toString();
+   *   networkServicesClient.deleteWasmPluginVersionAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. A name of the `WasmPluginVersion` resource to delete. Must be in the + * format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteWasmPluginVersionAsync(String name) { + DeleteWasmPluginVersionRequest request = + DeleteWasmPluginVersionRequest.newBuilder().setName(name).build(); + return deleteWasmPluginVersionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteWasmPluginVersionRequest request =
+   *       DeleteWasmPluginVersionRequest.newBuilder()
+   *           .setName(
+   *               WasmPluginVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *                   .toString())
+   *           .build();
+   *   networkServicesClient.deleteWasmPluginVersionAsync(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 deleteWasmPluginVersionAsync( + DeleteWasmPluginVersionRequest request) { + return deleteWasmPluginVersionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteWasmPluginVersionRequest request =
+   *       DeleteWasmPluginVersionRequest.newBuilder()
+   *           .setName(
+   *               WasmPluginVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       networkServicesClient.deleteWasmPluginVersionOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteWasmPluginVersionOperationCallable() { + return stub.deleteWasmPluginVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified `WasmPluginVersion` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   DeleteWasmPluginVersionRequest request =
+   *       DeleteWasmPluginVersionRequest.newBuilder()
+   *           .setName(
+   *               WasmPluginVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.deleteWasmPluginVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteWasmPluginVersionCallable() { + return stub.deleteWasmPluginVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPlugin` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the `WasmPlugin` resources are + * listed, specified in the following format: `projects/{project}/locations/global`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWasmPluginsPagedResponse listWasmPlugins(LocationName parent) { + ListWasmPluginsRequest request = + ListWasmPluginsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listWasmPlugins(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPlugin` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The project and location from which the `WasmPlugin` resources are + * listed, specified in the following format: `projects/{project}/locations/global`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWasmPluginsPagedResponse listWasmPlugins(String parent) { + ListWasmPluginsRequest request = ListWasmPluginsRequest.newBuilder().setParent(parent).build(); + return listWasmPlugins(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPlugin` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginsRequest request =
+   *       ListWasmPluginsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (WasmPlugin element : networkServicesClient.listWasmPlugins(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 ListWasmPluginsPagedResponse listWasmPlugins(ListWasmPluginsRequest request) { + return listWasmPluginsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPlugin` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginsRequest request =
+   *       ListWasmPluginsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       networkServicesClient.listWasmPluginsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (WasmPlugin element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listWasmPluginsPagedCallable() { + return stub.listWasmPluginsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists `WasmPlugin` resources 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   ListWasmPluginsRequest request =
+   *       ListWasmPluginsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListWasmPluginsResponse response =
+   *         networkServicesClient.listWasmPluginsCallable().call(request);
+   *     for (WasmPlugin element : response.getWasmPluginsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listWasmPluginsCallable() { + return stub.listWasmPluginsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPlugin` resource. + * + *

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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
+   *   WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
+   *   WasmPlugin response = networkServicesClient.getWasmPlugin(name);
+   * }
+   * }
+ * + * @param name Required. A name of the `WasmPlugin` resource to get. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final WasmPlugin getWasmPlugin(WasmPluginName name) { + GetWasmPluginRequest request = + GetWasmPluginRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getWasmPlugin(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1463,24 +3011,23 @@ public final EndpointPolicy getEndpointPolicy(EndpointPolicyName name) { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * String name = - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString(); - * EndpointPolicy response = networkServicesClient.getEndpointPolicy(name); + * String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + * WasmPlugin response = networkServicesClient.getWasmPlugin(name); * } * } * - * @param name Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * @param name Required. A name of the `WasmPlugin` resource to get. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final EndpointPolicy getEndpointPolicy(String name) { - GetEndpointPolicyRequest request = GetEndpointPolicyRequest.newBuilder().setName(name).build(); - return getEndpointPolicy(request); + public final WasmPlugin getWasmPlugin(String name) { + GetWasmPluginRequest request = GetWasmPluginRequest.newBuilder().setName(name).build(); + return getWasmPlugin(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets details of a single EndpointPolicy. + * Gets details of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1491,25 +3038,25 @@ public final EndpointPolicy getEndpointPolicy(String name) { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetEndpointPolicyRequest request = - * GetEndpointPolicyRequest.newBuilder() - * .setName( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) + * GetWasmPluginRequest request = + * GetWasmPluginRequest.newBuilder() + * .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + * .setView(WasmPluginView.forNumber(0)) * .build(); - * EndpointPolicy response = networkServicesClient.getEndpointPolicy(request); + * WasmPlugin response = networkServicesClient.getWasmPlugin(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 EndpointPolicy getEndpointPolicy(GetEndpointPolicyRequest request) { - return getEndpointPolicyCallable().call(request); + public final WasmPlugin getWasmPlugin(GetWasmPluginRequest request) { + return getWasmPluginCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets details of a single EndpointPolicy. + * Gets details of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1520,25 +3067,25 @@ public final EndpointPolicy getEndpointPolicy(GetEndpointPolicyRequest 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetEndpointPolicyRequest request = - * GetEndpointPolicyRequest.newBuilder() - * .setName( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) + * GetWasmPluginRequest request = + * GetWasmPluginRequest.newBuilder() + * .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + * .setView(WasmPluginView.forNumber(0)) * .build(); - * ApiFuture future = - * networkServicesClient.getEndpointPolicyCallable().futureCall(request); + * ApiFuture future = + * networkServicesClient.getWasmPluginCallable().futureCall(request); * // Do something. - * EndpointPolicy response = future.get(); + * WasmPlugin response = future.get(); * } * } */ - public final UnaryCallable getEndpointPolicyCallable() { - return stub.getEndpointPolicyCallable(); + public final UnaryCallable getWasmPluginCallable() { + return stub.getWasmPluginCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a new EndpointPolicy in a given project and location. + * Creates a new `WasmPlugin` resource in a given project and location. * *

Sample code: * @@ -1550,36 +3097,33 @@ public final UnaryCallable getEndpoint * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); - * String endpointPolicyId = "endpointPolicyId-509458782"; - * EndpointPolicy response = - * networkServicesClient - * .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId) - * .get(); + * WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + * String wasmPluginId = "wasmPluginId1902086770"; + * WasmPlugin response = + * networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); * } * } * - * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format - * `projects/*/locations/global`. - * @param endpointPolicy Required. EndpointPolicy resource to be created. - * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. - * "CustomECS". + * @param parent Required. The parent resource of the `WasmPlugin` resource. Must be in the format + * `projects/{project}/locations/global`. + * @param wasmPlugin Required. `WasmPlugin` resource to be created. + * @param wasmPluginId Required. User-provided ID of the `WasmPlugin` resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture createEndpointPolicyAsync( - LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId) { - CreateEndpointPolicyRequest request = - CreateEndpointPolicyRequest.newBuilder() + public final OperationFuture createWasmPluginAsync( + LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId) { + CreateWasmPluginRequest request = + CreateWasmPluginRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) - .setEndpointPolicy(endpointPolicy) - .setEndpointPolicyId(endpointPolicyId) + .setWasmPlugin(wasmPlugin) + .setWasmPluginId(wasmPluginId) .build(); - return createEndpointPolicyAsync(request); + return createWasmPluginAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a new EndpointPolicy in a given project and location. + * Creates a new `WasmPlugin` resource in a given project and location. * *

Sample code: * @@ -1591,36 +3135,33 @@ public final OperationFuture createEndpointPo * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - * EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); - * String endpointPolicyId = "endpointPolicyId-509458782"; - * EndpointPolicy response = - * networkServicesClient - * .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId) - * .get(); + * WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + * String wasmPluginId = "wasmPluginId1902086770"; + * WasmPlugin response = + * networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); * } * } * - * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format - * `projects/*/locations/global`. - * @param endpointPolicy Required. EndpointPolicy resource to be created. - * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. - * "CustomECS". + * @param parent Required. The parent resource of the `WasmPlugin` resource. Must be in the format + * `projects/{project}/locations/global`. + * @param wasmPlugin Required. `WasmPlugin` resource to be created. + * @param wasmPluginId Required. User-provided ID of the `WasmPlugin` resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture createEndpointPolicyAsync( - String parent, EndpointPolicy endpointPolicy, String endpointPolicyId) { - CreateEndpointPolicyRequest request = - CreateEndpointPolicyRequest.newBuilder() + public final OperationFuture createWasmPluginAsync( + String parent, WasmPlugin wasmPlugin, String wasmPluginId) { + CreateWasmPluginRequest request = + CreateWasmPluginRequest.newBuilder() .setParent(parent) - .setEndpointPolicy(endpointPolicy) - .setEndpointPolicyId(endpointPolicyId) + .setWasmPlugin(wasmPlugin) + .setWasmPluginId(wasmPluginId) .build(); - return createEndpointPolicyAsync(request); + return createWasmPluginAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a new EndpointPolicy in a given project and location. + * Creates a new `WasmPlugin` resource in a given project and location. * *

Sample code: * @@ -1631,27 +3172,27 @@ public final OperationFuture createEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * CreateEndpointPolicyRequest request = - * CreateEndpointPolicyRequest.newBuilder() + * CreateWasmPluginRequest request = + * CreateWasmPluginRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setEndpointPolicyId("endpointPolicyId-509458782") - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPluginId("wasmPluginId1902086770") + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); - * EndpointPolicy response = networkServicesClient.createEndpointPolicyAsync(request).get(); + * WasmPlugin response = networkServicesClient.createWasmPluginAsync(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 createEndpointPolicyAsync( - CreateEndpointPolicyRequest request) { - return createEndpointPolicyOperationCallable().futureCall(request); + public final OperationFuture createWasmPluginAsync( + CreateWasmPluginRequest request) { + return createWasmPluginOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a new EndpointPolicy in a given project and location. + * Creates a new `WasmPlugin` resource in a given project and location. * *

Sample code: * @@ -1662,27 +3203,27 @@ public final OperationFuture createEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * CreateEndpointPolicyRequest request = - * CreateEndpointPolicyRequest.newBuilder() + * CreateWasmPluginRequest request = + * CreateWasmPluginRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setEndpointPolicyId("endpointPolicyId-509458782") - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPluginId("wasmPluginId1902086770") + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); - * OperationFuture future = - * networkServicesClient.createEndpointPolicyOperationCallable().futureCall(request); + * OperationFuture future = + * networkServicesClient.createWasmPluginOperationCallable().futureCall(request); * // Do something. - * EndpointPolicy response = future.get(); + * WasmPlugin response = future.get(); * } * } */ - public final OperationCallable - createEndpointPolicyOperationCallable() { - return stub.createEndpointPolicyOperationCallable(); + public final OperationCallable + createWasmPluginOperationCallable() { + return stub.createWasmPluginOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a new EndpointPolicy in a given project and location. + * Creates a new `WasmPlugin` resource in a given project and location. * *

Sample code: * @@ -1693,27 +3234,26 @@ public final OperationFuture createEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * CreateEndpointPolicyRequest request = - * CreateEndpointPolicyRequest.newBuilder() + * CreateWasmPluginRequest request = + * CreateWasmPluginRequest.newBuilder() * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setEndpointPolicyId("endpointPolicyId-509458782") - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPluginId("wasmPluginId1902086770") + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); * ApiFuture future = - * networkServicesClient.createEndpointPolicyCallable().futureCall(request); + * networkServicesClient.createWasmPluginCallable().futureCall(request); * // Do something. * Operation response = future.get(); * } * } */ - public final UnaryCallable - createEndpointPolicyCallable() { - return stub.createEndpointPolicyCallable(); + public final UnaryCallable createWasmPluginCallable() { + return stub.createWasmPluginCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the parameters of a single EndpointPolicy. + * Updates the parameters of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1724,33 +3264,36 @@ public final OperationFuture createEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); + * WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); * FieldMask updateMask = FieldMask.newBuilder().build(); - * EndpointPolicy response = - * networkServicesClient.updateEndpointPolicyAsync(endpointPolicy, updateMask).get(); + * WasmPlugin response = + * networkServicesClient.updateWasmPluginAsync(wasmPlugin, updateMask).get(); * } * } * - * @param endpointPolicy Required. Updated EndpointPolicy resource. - * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. The fields specified in the update_mask are relative - * to the resource, not the full request. A field will be overwritten if it is in the mask. If - * the user does not provide a mask then all fields will be overwritten. + * @param wasmPlugin Required. Updated `WasmPlugin` resource. + * @param updateMask Optional. Used to specify the fields to be overwritten in the `WasmPlugin` + * resource by the update. The fields specified in the `update_mask` field are relative to the + * resource, not the full request. An omitted `update_mask` field is treated as an implied + * `update_mask` field equivalent to all fields that are populated (that have a non-empty + * value). The `update_mask` field supports a special value `*`, which means that each + * field in the given `WasmPlugin` resource (including the empty ones) replaces the current + * value. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture updateEndpointPolicyAsync( - EndpointPolicy endpointPolicy, FieldMask updateMask) { - UpdateEndpointPolicyRequest request = - UpdateEndpointPolicyRequest.newBuilder() - .setEndpointPolicy(endpointPolicy) + public final OperationFuture updateWasmPluginAsync( + WasmPlugin wasmPlugin, FieldMask updateMask) { + UpdateWasmPluginRequest request = + UpdateWasmPluginRequest.newBuilder() + .setWasmPlugin(wasmPlugin) .setUpdateMask(updateMask) .build(); - return updateEndpointPolicyAsync(request); + return updateWasmPluginAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the parameters of a single EndpointPolicy. + * Updates the parameters of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1761,26 +3304,26 @@ public final OperationFuture updateEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * UpdateEndpointPolicyRequest request = - * UpdateEndpointPolicyRequest.newBuilder() + * UpdateWasmPluginRequest request = + * UpdateWasmPluginRequest.newBuilder() * .setUpdateMask(FieldMask.newBuilder().build()) - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); - * EndpointPolicy response = networkServicesClient.updateEndpointPolicyAsync(request).get(); + * WasmPlugin response = networkServicesClient.updateWasmPluginAsync(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 updateEndpointPolicyAsync( - UpdateEndpointPolicyRequest request) { - return updateEndpointPolicyOperationCallable().futureCall(request); + public final OperationFuture updateWasmPluginAsync( + UpdateWasmPluginRequest request) { + return updateWasmPluginOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the parameters of a single EndpointPolicy. + * Updates the parameters of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1791,26 +3334,26 @@ public final OperationFuture updateEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * UpdateEndpointPolicyRequest request = - * UpdateEndpointPolicyRequest.newBuilder() + * UpdateWasmPluginRequest request = + * UpdateWasmPluginRequest.newBuilder() * .setUpdateMask(FieldMask.newBuilder().build()) - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); - * OperationFuture future = - * networkServicesClient.updateEndpointPolicyOperationCallable().futureCall(request); + * OperationFuture future = + * networkServicesClient.updateWasmPluginOperationCallable().futureCall(request); * // Do something. - * EndpointPolicy response = future.get(); + * WasmPlugin response = future.get(); * } * } */ - public final OperationCallable - updateEndpointPolicyOperationCallable() { - return stub.updateEndpointPolicyOperationCallable(); + public final OperationCallable + updateWasmPluginOperationCallable() { + return stub.updateWasmPluginOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates the parameters of a single EndpointPolicy. + * Updates the parameters of the specified `WasmPlugin` resource. * *

Sample code: * @@ -1821,26 +3364,25 @@ public final OperationFuture updateEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * UpdateEndpointPolicyRequest request = - * UpdateEndpointPolicyRequest.newBuilder() + * UpdateWasmPluginRequest request = + * UpdateWasmPluginRequest.newBuilder() * .setUpdateMask(FieldMask.newBuilder().build()) - * .setEndpointPolicy(EndpointPolicy.newBuilder().build()) + * .setWasmPlugin(WasmPlugin.newBuilder().build()) * .build(); * ApiFuture future = - * networkServicesClient.updateEndpointPolicyCallable().futureCall(request); + * networkServicesClient.updateWasmPluginCallable().futureCall(request); * // Do something. * Operation response = future.get(); * } * } */ - public final UnaryCallable - updateEndpointPolicyCallable() { - return stub.updateEndpointPolicyCallable(); + public final UnaryCallable updateWasmPluginCallable() { + return stub.updateWasmPluginCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a single EndpointPolicy. + * Deletes the specified `WasmPlugin` resource. * *

Sample code: * @@ -1851,28 +3393,25 @@ public final OperationFuture updateEndpointPo * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * EndpointPolicyName name = - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]"); - * networkServicesClient.deleteEndpointPolicyAsync(name).get(); + * WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + * networkServicesClient.deleteWasmPluginAsync(name).get(); * } * } * - * @param name Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * @param name Required. A name of the `WasmPlugin` resource to delete. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteEndpointPolicyAsync( - EndpointPolicyName name) { - DeleteEndpointPolicyRequest request = - DeleteEndpointPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return deleteEndpointPolicyAsync(request); + public final OperationFuture deleteWasmPluginAsync( + WasmPluginName name) { + DeleteWasmPluginRequest request = + DeleteWasmPluginRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteWasmPluginAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a single EndpointPolicy. + * Deletes the specified `WasmPlugin` resource. * *

Sample code: * @@ -1883,25 +3422,23 @@ public final OperationFuture deleteEndpointPolicyAsync * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * String name = - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString(); - * networkServicesClient.deleteEndpointPolicyAsync(name).get(); + * String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + * networkServicesClient.deleteWasmPluginAsync(name).get(); * } * } * - * @param name Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * @param name Required. A name of the `WasmPlugin` resource to delete. Must be in the format + * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final OperationFuture deleteEndpointPolicyAsync(String name) { - DeleteEndpointPolicyRequest request = - DeleteEndpointPolicyRequest.newBuilder().setName(name).build(); - return deleteEndpointPolicyAsync(request); + public final OperationFuture deleteWasmPluginAsync(String name) { + DeleteWasmPluginRequest request = DeleteWasmPluginRequest.newBuilder().setName(name).build(); + return deleteWasmPluginAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a single EndpointPolicy. + * Deletes the specified `WasmPlugin` resource. * *

Sample code: * @@ -1912,26 +3449,25 @@ public final OperationFuture deleteEndpointPolicyAsync * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * DeleteEndpointPolicyRequest request = - * DeleteEndpointPolicyRequest.newBuilder() - * .setName( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) + * DeleteWasmPluginRequest request = + * DeleteWasmPluginRequest.newBuilder() + * .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) * .build(); - * networkServicesClient.deleteEndpointPolicyAsync(request).get(); + * networkServicesClient.deleteWasmPluginAsync(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 deleteEndpointPolicyAsync( - DeleteEndpointPolicyRequest request) { - return deleteEndpointPolicyOperationCallable().futureCall(request); + public final OperationFuture deleteWasmPluginAsync( + DeleteWasmPluginRequest request) { + return deleteWasmPluginOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a single EndpointPolicy. + * Deletes the specified `WasmPlugin` resource. * *

Sample code: * @@ -1942,26 +3478,25 @@ public final OperationFuture deleteEndpointPolicyAsync * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * DeleteEndpointPolicyRequest request = - * DeleteEndpointPolicyRequest.newBuilder() - * .setName( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) + * DeleteWasmPluginRequest request = + * DeleteWasmPluginRequest.newBuilder() + * .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) * .build(); * OperationFuture future = - * networkServicesClient.deleteEndpointPolicyOperationCallable().futureCall(request); + * networkServicesClient.deleteWasmPluginOperationCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final OperationCallable - deleteEndpointPolicyOperationCallable() { - return stub.deleteEndpointPolicyOperationCallable(); + public final OperationCallable + deleteWasmPluginOperationCallable() { + return stub.deleteWasmPluginOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a single EndpointPolicy. + * Deletes the specified `WasmPlugin` resource. * *

Sample code: * @@ -1972,21 +3507,19 @@ public final OperationFuture deleteEndpointPolicyAsync * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * DeleteEndpointPolicyRequest request = - * DeleteEndpointPolicyRequest.newBuilder() - * .setName( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) + * DeleteWasmPluginRequest request = + * DeleteWasmPluginRequest.newBuilder() + * .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) * .build(); * ApiFuture future = - * networkServicesClient.deleteEndpointPolicyCallable().futureCall(request); + * networkServicesClient.deleteWasmPluginCallable().futureCall(request); * // Do something. * future.get(); * } * } */ - public final UnaryCallable - deleteEndpointPolicyCallable() { - return stub.deleteEndpointPolicyCallable(); + public final UnaryCallable deleteWasmPluginCallable() { + return stub.deleteWasmPluginCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. @@ -8767,6 +10300,171 @@ protected ListEndpointPoliciesFixedSizeCollection createCollection( } } + public static class ListWasmPluginVersionsPagedResponse + extends AbstractPagedListResponse< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + WasmPluginVersion, + ListWasmPluginVersionsPage, + ListWasmPluginVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListWasmPluginVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListWasmPluginVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListWasmPluginVersionsPagedResponse(ListWasmPluginVersionsPage page) { + super(page, ListWasmPluginVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListWasmPluginVersionsPage + extends AbstractPage< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + WasmPluginVersion, + ListWasmPluginVersionsPage> { + + private ListWasmPluginVersionsPage( + PageContext< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion> + context, + ListWasmPluginVersionsResponse response) { + super(context, response); + } + + private static ListWasmPluginVersionsPage createEmptyPage() { + return new ListWasmPluginVersionsPage(null, null); + } + + @Override + protected ListWasmPluginVersionsPage createPage( + PageContext< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion> + context, + ListWasmPluginVersionsResponse response) { + return new ListWasmPluginVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListWasmPluginVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + WasmPluginVersion, + ListWasmPluginVersionsPage, + ListWasmPluginVersionsFixedSizeCollection> { + + private ListWasmPluginVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListWasmPluginVersionsFixedSizeCollection createEmptyCollection() { + return new ListWasmPluginVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListWasmPluginVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListWasmPluginVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListWasmPluginsPagedResponse + extends AbstractPagedListResponse< + ListWasmPluginsRequest, + ListWasmPluginsResponse, + WasmPlugin, + ListWasmPluginsPage, + ListWasmPluginsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListWasmPluginsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListWasmPluginsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListWasmPluginsPagedResponse(ListWasmPluginsPage page) { + super(page, ListWasmPluginsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListWasmPluginsPage + extends AbstractPage< + ListWasmPluginsRequest, ListWasmPluginsResponse, WasmPlugin, ListWasmPluginsPage> { + + private ListWasmPluginsPage( + PageContext context, + ListWasmPluginsResponse response) { + super(context, response); + } + + private static ListWasmPluginsPage createEmptyPage() { + return new ListWasmPluginsPage(null, null); + } + + @Override + protected ListWasmPluginsPage createPage( + PageContext context, + ListWasmPluginsResponse response) { + return new ListWasmPluginsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListWasmPluginsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListWasmPluginsRequest, + ListWasmPluginsResponse, + WasmPlugin, + ListWasmPluginsPage, + ListWasmPluginsFixedSizeCollection> { + + private ListWasmPluginsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListWasmPluginsFixedSizeCollection createEmptyCollection() { + return new ListWasmPluginsFixedSizeCollection(null, 0); + } + + @Override + protected ListWasmPluginsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListWasmPluginsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListGatewaysPagedResponse extends AbstractPagedListResponse< ListGatewaysRequest, diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java index eb8ea5076be9..8c6829204c3c 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; @@ -188,6 +190,92 @@ public UnaryCallSettings deleteEndpointP .deleteEndpointPolicyOperationSettings(); } + /** Returns the object with the settings used for calls to listWasmPluginVersions. */ + public PagedCallSettings< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).listWasmPluginVersionsSettings(); + } + + /** Returns the object with the settings used for calls to getWasmPluginVersion. */ + public UnaryCallSettings + getWasmPluginVersionSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).getWasmPluginVersionSettings(); + } + + /** Returns the object with the settings used for calls to createWasmPluginVersion. */ + public UnaryCallSettings + createWasmPluginVersionSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).createWasmPluginVersionSettings(); + } + + /** Returns the object with the settings used for calls to createWasmPluginVersion. */ + public OperationCallSettings + createWasmPluginVersionOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()) + .createWasmPluginVersionOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteWasmPluginVersion. */ + public UnaryCallSettings + deleteWasmPluginVersionSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).deleteWasmPluginVersionSettings(); + } + + /** Returns the object with the settings used for calls to deleteWasmPluginVersion. */ + public OperationCallSettings + deleteWasmPluginVersionOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()) + .deleteWasmPluginVersionOperationSettings(); + } + + /** Returns the object with the settings used for calls to listWasmPlugins. */ + public PagedCallSettings< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).listWasmPluginsSettings(); + } + + /** Returns the object with the settings used for calls to getWasmPlugin. */ + public UnaryCallSettings getWasmPluginSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).getWasmPluginSettings(); + } + + /** Returns the object with the settings used for calls to createWasmPlugin. */ + public UnaryCallSettings createWasmPluginSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).createWasmPluginSettings(); + } + + /** Returns the object with the settings used for calls to createWasmPlugin. */ + public OperationCallSettings + createWasmPluginOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).createWasmPluginOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateWasmPlugin. */ + public UnaryCallSettings updateWasmPluginSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).updateWasmPluginSettings(); + } + + /** Returns the object with the settings used for calls to updateWasmPlugin. */ + public OperationCallSettings + updateWasmPluginOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).updateWasmPluginOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteWasmPlugin. */ + public UnaryCallSettings deleteWasmPluginSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).deleteWasmPluginSettings(); + } + + /** Returns the object with the settings used for calls to deleteWasmPlugin. */ + public OperationCallSettings + deleteWasmPluginOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).deleteWasmPluginOperationSettings(); + } + /** Returns the object with the settings used for calls to listGateways. */ public PagedCallSettings listGatewaysSettings() { @@ -775,6 +863,94 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().deleteEndpointPolicyOperationSettings(); } + /** Returns the builder for the settings used for calls to listWasmPluginVersions. */ + public PagedCallSettings.Builder< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings() { + return getStubSettingsBuilder().listWasmPluginVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to getWasmPluginVersion. */ + public UnaryCallSettings.Builder + getWasmPluginVersionSettings() { + return getStubSettingsBuilder().getWasmPluginVersionSettings(); + } + + /** Returns the builder for the settings used for calls to createWasmPluginVersion. */ + public UnaryCallSettings.Builder + createWasmPluginVersionSettings() { + return getStubSettingsBuilder().createWasmPluginVersionSettings(); + } + + /** Returns the builder for the settings used for calls to createWasmPluginVersion. */ + public OperationCallSettings.Builder< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationSettings() { + return getStubSettingsBuilder().createWasmPluginVersionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteWasmPluginVersion. */ + public UnaryCallSettings.Builder + deleteWasmPluginVersionSettings() { + return getStubSettingsBuilder().deleteWasmPluginVersionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteWasmPluginVersion. */ + public OperationCallSettings.Builder + deleteWasmPluginVersionOperationSettings() { + return getStubSettingsBuilder().deleteWasmPluginVersionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listWasmPlugins. */ + public PagedCallSettings.Builder< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings() { + return getStubSettingsBuilder().listWasmPluginsSettings(); + } + + /** Returns the builder for the settings used for calls to getWasmPlugin. */ + public UnaryCallSettings.Builder getWasmPluginSettings() { + return getStubSettingsBuilder().getWasmPluginSettings(); + } + + /** Returns the builder for the settings used for calls to createWasmPlugin. */ + public UnaryCallSettings.Builder + createWasmPluginSettings() { + return getStubSettingsBuilder().createWasmPluginSettings(); + } + + /** Returns the builder for the settings used for calls to createWasmPlugin. */ + public OperationCallSettings.Builder + createWasmPluginOperationSettings() { + return getStubSettingsBuilder().createWasmPluginOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateWasmPlugin. */ + public UnaryCallSettings.Builder + updateWasmPluginSettings() { + return getStubSettingsBuilder().updateWasmPluginSettings(); + } + + /** Returns the builder for the settings used for calls to updateWasmPlugin. */ + public OperationCallSettings.Builder + updateWasmPluginOperationSettings() { + return getStubSettingsBuilder().updateWasmPluginOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteWasmPlugin. */ + public UnaryCallSettings.Builder + deleteWasmPluginSettings() { + return getStubSettingsBuilder().deleteWasmPluginSettings(); + } + + /** Returns the builder for the settings used for calls to deleteWasmPlugin. */ + public OperationCallSettings.Builder + deleteWasmPluginOperationSettings() { + return getStubSettingsBuilder().deleteWasmPluginOperationSettings(); + } + /** Returns the builder for the settings used for calls to listGateways. */ public PagedCallSettings.Builder< ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json index 9fcd131c5f79..5e5c17bd9597 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json @@ -10,18 +10,27 @@ "grpc": { "libraryClient": "DepServiceClient", "rpcs": { + "CreateAuthzExtension": { + "methods": ["createAuthzExtensionAsync", "createAuthzExtensionAsync", "createAuthzExtensionAsync", "createAuthzExtensionOperationCallable", "createAuthzExtensionCallable"] + }, "CreateLbRouteExtension": { "methods": ["createLbRouteExtensionAsync", "createLbRouteExtensionAsync", "createLbRouteExtensionAsync", "createLbRouteExtensionOperationCallable", "createLbRouteExtensionCallable"] }, "CreateLbTrafficExtension": { "methods": ["createLbTrafficExtensionAsync", "createLbTrafficExtensionAsync", "createLbTrafficExtensionAsync", "createLbTrafficExtensionOperationCallable", "createLbTrafficExtensionCallable"] }, + "DeleteAuthzExtension": { + "methods": ["deleteAuthzExtensionAsync", "deleteAuthzExtensionAsync", "deleteAuthzExtensionAsync", "deleteAuthzExtensionOperationCallable", "deleteAuthzExtensionCallable"] + }, "DeleteLbRouteExtension": { "methods": ["deleteLbRouteExtensionAsync", "deleteLbRouteExtensionAsync", "deleteLbRouteExtensionAsync", "deleteLbRouteExtensionOperationCallable", "deleteLbRouteExtensionCallable"] }, "DeleteLbTrafficExtension": { "methods": ["deleteLbTrafficExtensionAsync", "deleteLbTrafficExtensionAsync", "deleteLbTrafficExtensionAsync", "deleteLbTrafficExtensionOperationCallable", "deleteLbTrafficExtensionCallable"] }, + "GetAuthzExtension": { + "methods": ["getAuthzExtension", "getAuthzExtension", "getAuthzExtension", "getAuthzExtensionCallable"] + }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicyCallable"] }, @@ -34,6 +43,9 @@ "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "ListAuthzExtensions": { + "methods": ["listAuthzExtensions", "listAuthzExtensions", "listAuthzExtensions", "listAuthzExtensionsPagedCallable", "listAuthzExtensionsCallable"] + }, "ListLbRouteExtensions": { "methods": ["listLbRouteExtensions", "listLbRouteExtensions", "listLbRouteExtensions", "listLbRouteExtensionsPagedCallable", "listLbRouteExtensionsCallable"] }, @@ -49,6 +61,9 @@ "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissionsCallable"] }, + "UpdateAuthzExtension": { + "methods": ["updateAuthzExtensionAsync", "updateAuthzExtensionAsync", "updateAuthzExtensionOperationCallable", "updateAuthzExtensionCallable"] + }, "UpdateLbRouteExtension": { "methods": ["updateLbRouteExtensionAsync", "updateLbRouteExtensionAsync", "updateLbRouteExtensionOperationCallable", "updateLbRouteExtensionCallable"] }, @@ -91,6 +106,12 @@ "CreateTlsRoute": { "methods": ["createTlsRouteAsync", "createTlsRouteAsync", "createTlsRouteAsync", "createTlsRouteOperationCallable", "createTlsRouteCallable"] }, + "CreateWasmPlugin": { + "methods": ["createWasmPluginAsync", "createWasmPluginAsync", "createWasmPluginAsync", "createWasmPluginOperationCallable", "createWasmPluginCallable"] + }, + "CreateWasmPluginVersion": { + "methods": ["createWasmPluginVersionAsync", "createWasmPluginVersionAsync", "createWasmPluginVersionAsync", "createWasmPluginVersionOperationCallable", "createWasmPluginVersionCallable"] + }, "DeleteEndpointPolicy": { "methods": ["deleteEndpointPolicyAsync", "deleteEndpointPolicyAsync", "deleteEndpointPolicyAsync", "deleteEndpointPolicyOperationCallable", "deleteEndpointPolicyCallable"] }, @@ -118,6 +139,12 @@ "DeleteTlsRoute": { "methods": ["deleteTlsRouteAsync", "deleteTlsRouteAsync", "deleteTlsRouteAsync", "deleteTlsRouteOperationCallable", "deleteTlsRouteCallable"] }, + "DeleteWasmPlugin": { + "methods": ["deleteWasmPluginAsync", "deleteWasmPluginAsync", "deleteWasmPluginAsync", "deleteWasmPluginOperationCallable", "deleteWasmPluginCallable"] + }, + "DeleteWasmPluginVersion": { + "methods": ["deleteWasmPluginVersionAsync", "deleteWasmPluginVersionAsync", "deleteWasmPluginVersionAsync", "deleteWasmPluginVersionOperationCallable", "deleteWasmPluginVersionCallable"] + }, "GetEndpointPolicy": { "methods": ["getEndpointPolicy", "getEndpointPolicy", "getEndpointPolicy", "getEndpointPolicyCallable"] }, @@ -157,6 +184,12 @@ "GetTlsRoute": { "methods": ["getTlsRoute", "getTlsRoute", "getTlsRoute", "getTlsRouteCallable"] }, + "GetWasmPlugin": { + "methods": ["getWasmPlugin", "getWasmPlugin", "getWasmPlugin", "getWasmPluginCallable"] + }, + "GetWasmPluginVersion": { + "methods": ["getWasmPluginVersion", "getWasmPluginVersion", "getWasmPluginVersion", "getWasmPluginVersionCallable"] + }, "ListEndpointPolicies": { "methods": ["listEndpointPolicies", "listEndpointPolicies", "listEndpointPolicies", "listEndpointPoliciesPagedCallable", "listEndpointPoliciesCallable"] }, @@ -193,6 +226,12 @@ "ListTlsRoutes": { "methods": ["listTlsRoutes", "listTlsRoutes", "listTlsRoutes", "listTlsRoutesPagedCallable", "listTlsRoutesCallable"] }, + "ListWasmPluginVersions": { + "methods": ["listWasmPluginVersions", "listWasmPluginVersions", "listWasmPluginVersions", "listWasmPluginVersionsPagedCallable", "listWasmPluginVersionsCallable"] + }, + "ListWasmPlugins": { + "methods": ["listWasmPlugins", "listWasmPlugins", "listWasmPlugins", "listWasmPluginsPagedCallable", "listWasmPluginsCallable"] + }, "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, @@ -225,6 +264,9 @@ }, "UpdateTlsRoute": { "methods": ["updateTlsRouteAsync", "updateTlsRouteAsync", "updateTlsRouteOperationCallable", "updateTlsRouteCallable"] + }, + "UpdateWasmPlugin": { + "methods": ["updateWasmPluginAsync", "updateWasmPluginAsync", "updateWasmPluginOperationCallable", "updateWasmPluginCallable"] } } } diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStub.java index f82a4fdc3cb8..9200ba546386 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -27,19 +28,26 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; import com.google.cloud.networkservices.v1.GetLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest; import com.google.cloud.networkservices.v1.LbRouteExtension; import com.google.cloud.networkservices.v1.LbTrafficExtension; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse; import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest; import com.google.iam.v1.GetIamPolicyRequest; @@ -163,6 +171,50 @@ public UnaryCallable deleteLbRouteExte throw new UnsupportedOperationException("Not implemented: deleteLbRouteExtensionCallable()"); } + public UnaryCallable + listAuthzExtensionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAuthzExtensionsPagedCallable()"); + } + + public UnaryCallable + listAuthzExtensionsCallable() { + throw new UnsupportedOperationException("Not implemented: listAuthzExtensionsCallable()"); + } + + public UnaryCallable getAuthzExtensionCallable() { + throw new UnsupportedOperationException("Not implemented: getAuthzExtensionCallable()"); + } + + public OperationCallable + createAuthzExtensionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAuthzExtensionOperationCallable()"); + } + + public UnaryCallable createAuthzExtensionCallable() { + throw new UnsupportedOperationException("Not implemented: createAuthzExtensionCallable()"); + } + + public OperationCallable + updateAuthzExtensionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAuthzExtensionOperationCallable()"); + } + + public UnaryCallable updateAuthzExtensionCallable() { + throw new UnsupportedOperationException("Not implemented: updateAuthzExtensionCallable()"); + } + + public OperationCallable + deleteAuthzExtensionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAuthzExtensionOperationCallable()"); + } + + public UnaryCallable deleteAuthzExtensionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAuthzExtensionCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStubSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStubSettings.java index 6f77a6c46d23..d61ebb441129 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStubSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/DepServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -54,19 +55,26 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; import com.google.cloud.networkservices.v1.GetLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest; import com.google.cloud.networkservices.v1.LbRouteExtension; import com.google.cloud.networkservices.v1.LbTrafficExtension; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse; import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest; import com.google.common.collect.ImmutableList; @@ -208,6 +216,25 @@ public class DepServiceStubSettings extends StubSettings deleteLbRouteExtensionSettings; private final OperationCallSettings deleteLbRouteExtensionOperationSettings; + private final PagedCallSettings< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings; + private final UnaryCallSettings + getAuthzExtensionSettings; + private final UnaryCallSettings + createAuthzExtensionSettings; + private final OperationCallSettings< + CreateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + createAuthzExtensionOperationSettings; + private final UnaryCallSettings + updateAuthzExtensionSettings; + private final OperationCallSettings< + UpdateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + updateAuthzExtensionOperationSettings; + private final UnaryCallSettings + deleteAuthzExtensionSettings; + private final OperationCallSettings + deleteAuthzExtensionOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -299,6 +326,44 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, AuthzExtension> + LIST_AUTHZ_EXTENSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, AuthzExtension>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAuthzExtensionsRequest injectToken( + ListAuthzExtensionsRequest payload, String token) { + return ListAuthzExtensionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAuthzExtensionsRequest injectPageSize( + ListAuthzExtensionsRequest payload, int pageSize) { + return ListAuthzExtensionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAuthzExtensionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAuthzExtensionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAuthzExtensionsResponse payload) { + return payload.getAuthzExtensionsList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -384,6 +449,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, ListAuthzExtensionsPagedResponse> + LIST_AUTHZ_EXTENSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + ListAuthzExtensionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAuthzExtensionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AUTHZ_EXTENSIONS_PAGE_STR_DESC, request, context); + return ListAuthzExtensionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -505,6 +591,51 @@ public ApiFuture getFuturePagedResponse( return deleteLbRouteExtensionOperationSettings; } + /** Returns the object with the settings used for calls to listAuthzExtensions. */ + public PagedCallSettings< + ListAuthzExtensionsRequest, ListAuthzExtensionsResponse, ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings() { + return listAuthzExtensionsSettings; + } + + /** Returns the object with the settings used for calls to getAuthzExtension. */ + public UnaryCallSettings getAuthzExtensionSettings() { + return getAuthzExtensionSettings; + } + + /** Returns the object with the settings used for calls to createAuthzExtension. */ + public UnaryCallSettings createAuthzExtensionSettings() { + return createAuthzExtensionSettings; + } + + /** Returns the object with the settings used for calls to createAuthzExtension. */ + public OperationCallSettings + createAuthzExtensionOperationSettings() { + return createAuthzExtensionOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAuthzExtension. */ + public UnaryCallSettings updateAuthzExtensionSettings() { + return updateAuthzExtensionSettings; + } + + /** Returns the object with the settings used for calls to updateAuthzExtension. */ + public OperationCallSettings + updateAuthzExtensionOperationSettings() { + return updateAuthzExtensionOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAuthzExtension. */ + public UnaryCallSettings deleteAuthzExtensionSettings() { + return deleteAuthzExtensionSettings; + } + + /** Returns the object with the settings used for calls to deleteAuthzExtension. */ + public OperationCallSettings + deleteAuthzExtensionOperationSettings() { + return deleteAuthzExtensionOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -665,6 +796,17 @@ protected DepServiceStubSettings(Builder settingsBuilder) throws IOException { deleteLbRouteExtensionSettings = settingsBuilder.deleteLbRouteExtensionSettings().build(); deleteLbRouteExtensionOperationSettings = settingsBuilder.deleteLbRouteExtensionOperationSettings().build(); + listAuthzExtensionsSettings = settingsBuilder.listAuthzExtensionsSettings().build(); + getAuthzExtensionSettings = settingsBuilder.getAuthzExtensionSettings().build(); + createAuthzExtensionSettings = settingsBuilder.createAuthzExtensionSettings().build(); + createAuthzExtensionOperationSettings = + settingsBuilder.createAuthzExtensionOperationSettings().build(); + updateAuthzExtensionSettings = settingsBuilder.updateAuthzExtensionSettings().build(); + updateAuthzExtensionOperationSettings = + settingsBuilder.updateAuthzExtensionOperationSettings().build(); + deleteAuthzExtensionSettings = settingsBuilder.deleteAuthzExtensionSettings().build(); + deleteAuthzExtensionOperationSettings = + settingsBuilder.deleteAuthzExtensionOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -719,6 +861,28 @@ public static class Builder extends StubSettings.Builder deleteLbRouteExtensionOperationSettings; + private final PagedCallSettings.Builder< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings; + private final UnaryCallSettings.Builder + getAuthzExtensionSettings; + private final UnaryCallSettings.Builder + createAuthzExtensionSettings; + private final OperationCallSettings.Builder< + CreateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + createAuthzExtensionOperationSettings; + private final UnaryCallSettings.Builder + updateAuthzExtensionSettings; + private final OperationCallSettings.Builder< + UpdateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + updateAuthzExtensionOperationSettings; + private final UnaryCallSettings.Builder + deleteAuthzExtensionSettings; + private final OperationCallSettings.Builder< + DeleteAuthzExtensionRequest, Empty, OperationMetadata> + deleteAuthzExtensionOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -779,6 +943,15 @@ protected Builder(ClientContext clientContext) { updateLbRouteExtensionOperationSettings = OperationCallSettings.newBuilder(); deleteLbRouteExtensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteLbRouteExtensionOperationSettings = OperationCallSettings.newBuilder(); + listAuthzExtensionsSettings = + PagedCallSettings.newBuilder(LIST_AUTHZ_EXTENSIONS_PAGE_STR_FACT); + getAuthzExtensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAuthzExtensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAuthzExtensionOperationSettings = OperationCallSettings.newBuilder(); + updateAuthzExtensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAuthzExtensionOperationSettings = OperationCallSettings.newBuilder(); + deleteAuthzExtensionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAuthzExtensionOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -797,6 +970,11 @@ protected Builder(ClientContext clientContext) { createLbRouteExtensionSettings, updateLbRouteExtensionSettings, deleteLbRouteExtensionSettings, + listAuthzExtensionsSettings, + getAuthzExtensionSettings, + createAuthzExtensionSettings, + updateAuthzExtensionSettings, + deleteAuthzExtensionSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -830,6 +1008,17 @@ protected Builder(DepServiceStubSettings settings) { deleteLbRouteExtensionSettings = settings.deleteLbRouteExtensionSettings.toBuilder(); deleteLbRouteExtensionOperationSettings = settings.deleteLbRouteExtensionOperationSettings.toBuilder(); + listAuthzExtensionsSettings = settings.listAuthzExtensionsSettings.toBuilder(); + getAuthzExtensionSettings = settings.getAuthzExtensionSettings.toBuilder(); + createAuthzExtensionSettings = settings.createAuthzExtensionSettings.toBuilder(); + createAuthzExtensionOperationSettings = + settings.createAuthzExtensionOperationSettings.toBuilder(); + updateAuthzExtensionSettings = settings.updateAuthzExtensionSettings.toBuilder(); + updateAuthzExtensionOperationSettings = + settings.updateAuthzExtensionOperationSettings.toBuilder(); + deleteAuthzExtensionSettings = settings.deleteAuthzExtensionSettings.toBuilder(); + deleteAuthzExtensionOperationSettings = + settings.deleteAuthzExtensionOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -848,6 +1037,11 @@ protected Builder(DepServiceStubSettings settings) { createLbRouteExtensionSettings, updateLbRouteExtensionSettings, deleteLbRouteExtensionSettings, + listAuthzExtensionsSettings, + getAuthzExtensionSettings, + createAuthzExtensionSettings, + updateAuthzExtensionSettings, + deleteAuthzExtensionSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -930,6 +1124,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listAuthzExtensionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getAuthzExtensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createAuthzExtensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateAuthzExtensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteAuthzExtensionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -1099,6 +1318,78 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .createAuthzExtensionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AuthzExtension.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 + .updateAuthzExtensionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AuthzExtension.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 + .deleteAuthzExtensionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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; } @@ -1223,6 +1514,59 @@ public Builder applyToAllUnaryMethods( return deleteLbRouteExtensionOperationSettings; } + /** Returns the builder for the settings used for calls to listAuthzExtensions. */ + public PagedCallSettings.Builder< + ListAuthzExtensionsRequest, + ListAuthzExtensionsResponse, + ListAuthzExtensionsPagedResponse> + listAuthzExtensionsSettings() { + return listAuthzExtensionsSettings; + } + + /** Returns the builder for the settings used for calls to getAuthzExtension. */ + public UnaryCallSettings.Builder + getAuthzExtensionSettings() { + return getAuthzExtensionSettings; + } + + /** Returns the builder for the settings used for calls to createAuthzExtension. */ + public UnaryCallSettings.Builder + createAuthzExtensionSettings() { + return createAuthzExtensionSettings; + } + + /** Returns the builder for the settings used for calls to createAuthzExtension. */ + public OperationCallSettings.Builder< + CreateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + createAuthzExtensionOperationSettings() { + return createAuthzExtensionOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAuthzExtension. */ + public UnaryCallSettings.Builder + updateAuthzExtensionSettings() { + return updateAuthzExtensionSettings; + } + + /** Returns the builder for the settings used for calls to updateAuthzExtension. */ + public OperationCallSettings.Builder< + UpdateAuthzExtensionRequest, AuthzExtension, OperationMetadata> + updateAuthzExtensionOperationSettings() { + return updateAuthzExtensionOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAuthzExtension. */ + public UnaryCallSettings.Builder + deleteAuthzExtensionSettings() { + return deleteAuthzExtensionSettings; + } + + /** Returns the builder for the settings used for calls to deleteAuthzExtension. */ + public OperationCallSettings.Builder + deleteAuthzExtensionOperationSettings() { + return deleteAuthzExtensionOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcDepServiceStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcDepServiceStub.java index 6d8852f445e2..455239ff99d6 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcDepServiceStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcDepServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -32,19 +33,26 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; import com.google.cloud.networkservices.v1.GetLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest; import com.google.cloud.networkservices.v1.LbRouteExtension; import com.google.cloud.networkservices.v1.LbTrafficExtension; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse; import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest; import com.google.iam.v1.GetIamPolicyRequest; @@ -180,6 +188,57 @@ public class GrpcDepServiceStub extends DepServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listAuthzExtensionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.DepService/ListAuthzExtensions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAuthzExtensionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAuthzExtensionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAuthzExtensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.DepService/GetAuthzExtension") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAuthzExtensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AuthzExtension.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAuthzExtensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.DepService/CreateAuthzExtension") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAuthzExtensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAuthzExtensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.DepService/UpdateAuthzExtension") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAuthzExtensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAuthzExtensionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.DepService/DeleteAuthzExtension") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAuthzExtensionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -266,6 +325,20 @@ public class GrpcDepServiceStub extends DepServiceStub { deleteLbRouteExtensionCallable; private final OperationCallable deleteLbRouteExtensionOperationCallable; + private final UnaryCallable + listAuthzExtensionsCallable; + private final UnaryCallable + listAuthzExtensionsPagedCallable; + private final UnaryCallable getAuthzExtensionCallable; + private final UnaryCallable createAuthzExtensionCallable; + private final OperationCallable + createAuthzExtensionOperationCallable; + private final UnaryCallable updateAuthzExtensionCallable; + private final OperationCallable + updateAuthzExtensionOperationCallable; + private final UnaryCallable deleteAuthzExtensionCallable; + private final OperationCallable + deleteAuthzExtensionOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -433,6 +506,59 @@ protected GrpcDepServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + listAuthzExtensionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAuthzExtensionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAuthzExtensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAuthzExtensionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createAuthzExtensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAuthzExtensionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAuthzExtensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAuthzExtensionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "authz_extension.name", + String.valueOf(request.getAuthzExtension().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAuthzExtensionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAuthzExtensionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -581,6 +707,54 @@ protected GrpcDepServiceStub( settings.deleteLbRouteExtensionOperationSettings(), clientContext, operationsStub); + this.listAuthzExtensionsCallable = + callableFactory.createUnaryCallable( + listAuthzExtensionsTransportSettings, + settings.listAuthzExtensionsSettings(), + clientContext); + this.listAuthzExtensionsPagedCallable = + callableFactory.createPagedCallable( + listAuthzExtensionsTransportSettings, + settings.listAuthzExtensionsSettings(), + clientContext); + this.getAuthzExtensionCallable = + callableFactory.createUnaryCallable( + getAuthzExtensionTransportSettings, + settings.getAuthzExtensionSettings(), + clientContext); + this.createAuthzExtensionCallable = + callableFactory.createUnaryCallable( + createAuthzExtensionTransportSettings, + settings.createAuthzExtensionSettings(), + clientContext); + this.createAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + createAuthzExtensionTransportSettings, + settings.createAuthzExtensionOperationSettings(), + clientContext, + operationsStub); + this.updateAuthzExtensionCallable = + callableFactory.createUnaryCallable( + updateAuthzExtensionTransportSettings, + settings.updateAuthzExtensionSettings(), + clientContext); + this.updateAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + updateAuthzExtensionTransportSettings, + settings.updateAuthzExtensionOperationSettings(), + clientContext, + operationsStub); + this.deleteAuthzExtensionCallable = + callableFactory.createUnaryCallable( + deleteAuthzExtensionTransportSettings, + settings.deleteAuthzExtensionSettings(), + clientContext); + this.deleteAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + deleteAuthzExtensionTransportSettings, + settings.deleteAuthzExtensionOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -714,6 +888,56 @@ public UnaryCallable deleteLbRouteExte return deleteLbRouteExtensionOperationCallable; } + @Override + public UnaryCallable + listAuthzExtensionsCallable() { + return listAuthzExtensionsCallable; + } + + @Override + public UnaryCallable + listAuthzExtensionsPagedCallable() { + return listAuthzExtensionsPagedCallable; + } + + @Override + public UnaryCallable getAuthzExtensionCallable() { + return getAuthzExtensionCallable; + } + + @Override + public UnaryCallable createAuthzExtensionCallable() { + return createAuthzExtensionCallable; + } + + @Override + public OperationCallable + createAuthzExtensionOperationCallable() { + return createAuthzExtensionOperationCallable; + } + + @Override + public UnaryCallable updateAuthzExtensionCallable() { + return updateAuthzExtensionCallable; + } + + @Override + public OperationCallable + updateAuthzExtensionOperationCallable() { + return updateAuthzExtensionOperationCallable; + } + + @Override + public UnaryCallable deleteAuthzExtensionCallable() { + return deleteAuthzExtensionCallable; + } + + @Override + public OperationCallable + deleteAuthzExtensionOperationCallable() { + return deleteAuthzExtensionOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java index c8c2caf76c26..49b448b9c102 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; @@ -50,6 +52,8 @@ import com.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.CreateTcpRouteRequest; import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -59,6 +63,8 @@ import com.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.DeleteTcpRouteRequest; import com.google.cloud.networkservices.v1.DeleteTlsRouteRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; @@ -73,6 +79,8 @@ import com.google.cloud.networkservices.v1.GetServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.GetTcpRouteRequest; import com.google.cloud.networkservices.v1.GetTlsRouteRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; @@ -97,6 +105,10 @@ import com.google.cloud.networkservices.v1.ListTcpRoutesResponse; import com.google.cloud.networkservices.v1.ListTlsRoutesRequest; import com.google.cloud.networkservices.v1.ListTlsRoutesResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginsResponse; import com.google.cloud.networkservices.v1.Mesh; import com.google.cloud.networkservices.v1.MeshRouteView; import com.google.cloud.networkservices.v1.OperationMetadata; @@ -113,6 +125,9 @@ import com.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.UpdateTcpRouteRequest; import com.google.cloud.networkservices.v1.UpdateTlsRouteRequest; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginVersion; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -191,6 +206,104 @@ public class GrpcNetworkServicesStub extends NetworkServicesStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse> + listWasmPluginVersionsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/ListWasmPluginVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListWasmPluginVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListWasmPluginVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getWasmPluginVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/GetWasmPluginVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetWasmPluginVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(WasmPluginVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createWasmPluginVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/CreateWasmPluginVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateWasmPluginVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteWasmPluginVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/DeleteWasmPluginVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteWasmPluginVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listWasmPluginsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/ListWasmPlugins") + .setRequestMarshaller( + ProtoUtils.marshaller(ListWasmPluginsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListWasmPluginsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getWasmPluginMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/GetWasmPlugin") + .setRequestMarshaller( + ProtoUtils.marshaller(GetWasmPluginRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(WasmPlugin.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createWasmPluginMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/CreateWasmPlugin") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateWasmPluginRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateWasmPluginMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/UpdateWasmPlugin") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateWasmPluginRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteWasmPluginMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/DeleteWasmPlugin") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteWasmPluginRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listGatewaysMethodDescriptor = MethodDescriptor.newBuilder() @@ -695,6 +808,35 @@ public class GrpcNetworkServicesStub extends NetworkServicesStub { private final UnaryCallable deleteEndpointPolicyCallable; private final OperationCallable deleteEndpointPolicyOperationCallable; + private final UnaryCallable + listWasmPluginVersionsCallable; + private final UnaryCallable + listWasmPluginVersionsPagedCallable; + private final UnaryCallable + getWasmPluginVersionCallable; + private final UnaryCallable + createWasmPluginVersionCallable; + private final OperationCallable< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationCallable; + private final UnaryCallable + deleteWasmPluginVersionCallable; + private final OperationCallable + deleteWasmPluginVersionOperationCallable; + private final UnaryCallable + listWasmPluginsCallable; + private final UnaryCallable + listWasmPluginsPagedCallable; + private final UnaryCallable getWasmPluginCallable; + private final UnaryCallable createWasmPluginCallable; + private final OperationCallable + createWasmPluginOperationCallable; + private final UnaryCallable updateWasmPluginCallable; + private final OperationCallable + updateWasmPluginOperationCallable; + private final UnaryCallable deleteWasmPluginCallable; + private final OperationCallable + deleteWasmPluginOperationCallable; private final UnaryCallable listGatewaysCallable; private final UnaryCallable listGatewaysPagedCallable; @@ -921,6 +1063,103 @@ protected GrpcNetworkServicesStub( return builder.build(); }) .build(); + GrpcCallSettings + listWasmPluginVersionsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listWasmPluginVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getWasmPluginVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getWasmPluginVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createWasmPluginVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createWasmPluginVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteWasmPluginVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteWasmPluginVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listWasmPluginsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listWasmPluginsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getWasmPluginTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getWasmPluginMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createWasmPluginTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createWasmPluginMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateWasmPluginTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateWasmPluginMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "wasm_plugin.name", String.valueOf(request.getWasmPlugin().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteWasmPluginTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteWasmPluginMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listGatewaysTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listGatewaysMethodDescriptor) @@ -1478,6 +1717,79 @@ protected GrpcNetworkServicesStub( settings.deleteEndpointPolicyOperationSettings(), clientContext, operationsStub); + this.listWasmPluginVersionsCallable = + callableFactory.createUnaryCallable( + listWasmPluginVersionsTransportSettings, + settings.listWasmPluginVersionsSettings(), + clientContext); + this.listWasmPluginVersionsPagedCallable = + callableFactory.createPagedCallable( + listWasmPluginVersionsTransportSettings, + settings.listWasmPluginVersionsSettings(), + clientContext); + this.getWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + getWasmPluginVersionTransportSettings, + settings.getWasmPluginVersionSettings(), + clientContext); + this.createWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + createWasmPluginVersionTransportSettings, + settings.createWasmPluginVersionSettings(), + clientContext); + this.createWasmPluginVersionOperationCallable = + callableFactory.createOperationCallable( + createWasmPluginVersionTransportSettings, + settings.createWasmPluginVersionOperationSettings(), + clientContext, + operationsStub); + this.deleteWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + deleteWasmPluginVersionTransportSettings, + settings.deleteWasmPluginVersionSettings(), + clientContext); + this.deleteWasmPluginVersionOperationCallable = + callableFactory.createOperationCallable( + deleteWasmPluginVersionTransportSettings, + settings.deleteWasmPluginVersionOperationSettings(), + clientContext, + operationsStub); + this.listWasmPluginsCallable = + callableFactory.createUnaryCallable( + listWasmPluginsTransportSettings, settings.listWasmPluginsSettings(), clientContext); + this.listWasmPluginsPagedCallable = + callableFactory.createPagedCallable( + listWasmPluginsTransportSettings, settings.listWasmPluginsSettings(), clientContext); + this.getWasmPluginCallable = + callableFactory.createUnaryCallable( + getWasmPluginTransportSettings, settings.getWasmPluginSettings(), clientContext); + this.createWasmPluginCallable = + callableFactory.createUnaryCallable( + createWasmPluginTransportSettings, settings.createWasmPluginSettings(), clientContext); + this.createWasmPluginOperationCallable = + callableFactory.createOperationCallable( + createWasmPluginTransportSettings, + settings.createWasmPluginOperationSettings(), + clientContext, + operationsStub); + this.updateWasmPluginCallable = + callableFactory.createUnaryCallable( + updateWasmPluginTransportSettings, settings.updateWasmPluginSettings(), clientContext); + this.updateWasmPluginOperationCallable = + callableFactory.createOperationCallable( + updateWasmPluginTransportSettings, + settings.updateWasmPluginOperationSettings(), + clientContext, + operationsStub); + this.deleteWasmPluginCallable = + callableFactory.createUnaryCallable( + deleteWasmPluginTransportSettings, settings.deleteWasmPluginSettings(), clientContext); + this.deleteWasmPluginOperationCallable = + callableFactory.createOperationCallable( + deleteWasmPluginTransportSettings, + settings.deleteWasmPluginOperationSettings(), + clientContext, + operationsStub); this.listGatewaysCallable = callableFactory.createUnaryCallable( listGatewaysTransportSettings, settings.listGatewaysSettings(), clientContext); @@ -1897,6 +2209,97 @@ public UnaryCallable deleteEndpointPolic return deleteEndpointPolicyOperationCallable; } + @Override + public UnaryCallable + listWasmPluginVersionsCallable() { + return listWasmPluginVersionsCallable; + } + + @Override + public UnaryCallable + listWasmPluginVersionsPagedCallable() { + return listWasmPluginVersionsPagedCallable; + } + + @Override + public UnaryCallable + getWasmPluginVersionCallable() { + return getWasmPluginVersionCallable; + } + + @Override + public UnaryCallable + createWasmPluginVersionCallable() { + return createWasmPluginVersionCallable; + } + + @Override + public OperationCallable + createWasmPluginVersionOperationCallable() { + return createWasmPluginVersionOperationCallable; + } + + @Override + public UnaryCallable + deleteWasmPluginVersionCallable() { + return deleteWasmPluginVersionCallable; + } + + @Override + public OperationCallable + deleteWasmPluginVersionOperationCallable() { + return deleteWasmPluginVersionOperationCallable; + } + + @Override + public UnaryCallable listWasmPluginsCallable() { + return listWasmPluginsCallable; + } + + @Override + public UnaryCallable + listWasmPluginsPagedCallable() { + return listWasmPluginsPagedCallable; + } + + @Override + public UnaryCallable getWasmPluginCallable() { + return getWasmPluginCallable; + } + + @Override + public UnaryCallable createWasmPluginCallable() { + return createWasmPluginCallable; + } + + @Override + public OperationCallable + createWasmPluginOperationCallable() { + return createWasmPluginOperationCallable; + } + + @Override + public UnaryCallable updateWasmPluginCallable() { + return updateWasmPluginCallable; + } + + @Override + public OperationCallable + updateWasmPluginOperationCallable() { + return updateWasmPluginOperationCallable; + } + + @Override + public UnaryCallable deleteWasmPluginCallable() { + return deleteWasmPluginCallable; + } + + @Override + public OperationCallable + deleteWasmPluginOperationCallable() { + return deleteWasmPluginOperationCallable; + } + @Override public UnaryCallable listGatewaysCallable() { return listGatewaysCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonDepServiceStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonDepServiceStub.java index b46f377caa06..aca34d899d6f 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonDepServiceStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonDepServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -40,19 +41,26 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; import com.google.cloud.networkservices.v1.GetLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.GetLbTrafficExtensionRequest; import com.google.cloud.networkservices.v1.LbRouteExtension; import com.google.cloud.networkservices.v1.LbTrafficExtension; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbRouteExtensionsResponse; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest; import com.google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse; import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest; import com.google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest; import com.google.common.collect.ImmutableMap; @@ -86,6 +94,7 @@ public class HttpJsonDepServiceStub extends DepServiceStub { .add(LbRouteExtension.getDescriptor()) .add(LbTrafficExtension.getDescriptor()) .add(OperationMetadata.getDescriptor()) + .add(AuthzExtension.getDescriptor()) .build(); private static final ApiMethodDescriptor< @@ -497,6 +506,204 @@ public class HttpJsonDepServiceStub extends DepServiceStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + listAuthzExtensionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.DepService/ListAuthzExtensions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/authzExtensions", + 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, "orderBy", request.getOrderBy()); + 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(ListAuthzExtensionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAuthzExtensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.DepService/GetAuthzExtension") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/authzExtensions/*}", + 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(AuthzExtension.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAuthzExtensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.DepService/CreateAuthzExtension") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/authzExtensions", + 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, "authzExtensionId", request.getAuthzExtensionId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("authzExtension", request.getAuthzExtension(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAuthzExtensionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateAuthzExtensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.DepService/UpdateAuthzExtension") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{authzExtension.name=projects/*/locations/*/authzExtensions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "authzExtension.name", + request.getAuthzExtension().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("authzExtension", request.getAuthzExtension(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAuthzExtensionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAuthzExtensionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.DepService/DeleteAuthzExtension") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/authzExtensions/*}", + 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, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAuthzExtensionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -734,6 +941,20 @@ public class HttpJsonDepServiceStub extends DepServiceStub { deleteLbRouteExtensionCallable; private final OperationCallable deleteLbRouteExtensionOperationCallable; + private final UnaryCallable + listAuthzExtensionsCallable; + private final UnaryCallable + listAuthzExtensionsPagedCallable; + private final UnaryCallable getAuthzExtensionCallable; + private final UnaryCallable createAuthzExtensionCallable; + private final OperationCallable + createAuthzExtensionOperationCallable; + private final UnaryCallable updateAuthzExtensionCallable; + private final OperationCallable + updateAuthzExtensionOperationCallable; + private final UnaryCallable deleteAuthzExtensionCallable; + private final OperationCallable + deleteAuthzExtensionOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -939,6 +1160,69 @@ protected HttpJsonDepServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listAuthzExtensionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAuthzExtensionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getAuthzExtensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAuthzExtensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createAuthzExtensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAuthzExtensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateAuthzExtensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAuthzExtensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "authz_extension.name", + String.valueOf(request.getAuthzExtension().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteAuthzExtensionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAuthzExtensionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1093,6 +1377,54 @@ protected HttpJsonDepServiceStub( settings.deleteLbRouteExtensionOperationSettings(), clientContext, httpJsonOperationsStub); + this.listAuthzExtensionsCallable = + callableFactory.createUnaryCallable( + listAuthzExtensionsTransportSettings, + settings.listAuthzExtensionsSettings(), + clientContext); + this.listAuthzExtensionsPagedCallable = + callableFactory.createPagedCallable( + listAuthzExtensionsTransportSettings, + settings.listAuthzExtensionsSettings(), + clientContext); + this.getAuthzExtensionCallable = + callableFactory.createUnaryCallable( + getAuthzExtensionTransportSettings, + settings.getAuthzExtensionSettings(), + clientContext); + this.createAuthzExtensionCallable = + callableFactory.createUnaryCallable( + createAuthzExtensionTransportSettings, + settings.createAuthzExtensionSettings(), + clientContext); + this.createAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + createAuthzExtensionTransportSettings, + settings.createAuthzExtensionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateAuthzExtensionCallable = + callableFactory.createUnaryCallable( + updateAuthzExtensionTransportSettings, + settings.updateAuthzExtensionSettings(), + clientContext); + this.updateAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + updateAuthzExtensionTransportSettings, + settings.updateAuthzExtensionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAuthzExtensionCallable = + callableFactory.createUnaryCallable( + deleteAuthzExtensionTransportSettings, + settings.deleteAuthzExtensionSettings(), + clientContext); + this.deleteAuthzExtensionOperationCallable = + callableFactory.createOperationCallable( + deleteAuthzExtensionTransportSettings, + settings.deleteAuthzExtensionOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1131,6 +1463,11 @@ public static List getMethodDescriptors() { methodDescriptors.add(createLbRouteExtensionMethodDescriptor); methodDescriptors.add(updateLbRouteExtensionMethodDescriptor); methodDescriptors.add(deleteLbRouteExtensionMethodDescriptor); + methodDescriptors.add(listAuthzExtensionsMethodDescriptor); + methodDescriptors.add(getAuthzExtensionMethodDescriptor); + methodDescriptors.add(createAuthzExtensionMethodDescriptor); + methodDescriptors.add(updateAuthzExtensionMethodDescriptor); + methodDescriptors.add(deleteAuthzExtensionMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); @@ -1247,6 +1584,56 @@ public UnaryCallable deleteLbRouteExte return deleteLbRouteExtensionOperationCallable; } + @Override + public UnaryCallable + listAuthzExtensionsCallable() { + return listAuthzExtensionsCallable; + } + + @Override + public UnaryCallable + listAuthzExtensionsPagedCallable() { + return listAuthzExtensionsPagedCallable; + } + + @Override + public UnaryCallable getAuthzExtensionCallable() { + return getAuthzExtensionCallable; + } + + @Override + public UnaryCallable createAuthzExtensionCallable() { + return createAuthzExtensionCallable; + } + + @Override + public OperationCallable + createAuthzExtensionOperationCallable() { + return createAuthzExtensionOperationCallable; + } + + @Override + public UnaryCallable updateAuthzExtensionCallable() { + return updateAuthzExtensionCallable; + } + + @Override + public OperationCallable + updateAuthzExtensionOperationCallable() { + return updateAuthzExtensionOperationCallable; + } + + @Override + public UnaryCallable deleteAuthzExtensionCallable() { + return deleteAuthzExtensionCallable; + } + + @Override + public OperationCallable + deleteAuthzExtensionOperationCallable() { + return deleteAuthzExtensionOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java index ce1989cf8b45..007547b6b2c6 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.HttpRule; import com.google.api.core.InternalApi; @@ -58,6 +60,8 @@ import com.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.CreateTcpRouteRequest; import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -67,6 +71,8 @@ import com.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.DeleteTcpRouteRequest; import com.google.cloud.networkservices.v1.DeleteTlsRouteRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; @@ -81,6 +87,8 @@ import com.google.cloud.networkservices.v1.GetServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.GetTcpRouteRequest; import com.google.cloud.networkservices.v1.GetTlsRouteRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; @@ -105,6 +113,10 @@ import com.google.cloud.networkservices.v1.ListTcpRoutesResponse; import com.google.cloud.networkservices.v1.ListTlsRoutesRequest; import com.google.cloud.networkservices.v1.ListTlsRoutesResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginsResponse; import com.google.cloud.networkservices.v1.Mesh; import com.google.cloud.networkservices.v1.MeshRouteView; import com.google.cloud.networkservices.v1.OperationMetadata; @@ -121,6 +133,9 @@ import com.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.UpdateTcpRouteRequest; import com.google.cloud.networkservices.v1.UpdateTlsRouteRequest; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginVersion; import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; @@ -148,17 +163,19 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) + .add(WasmPluginVersion.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(EndpointPolicy.getDescriptor()) - .add(Gateway.getDescriptor()) + .add(WasmPlugin.getDescriptor()) .add(TcpRoute.getDescriptor()) .add(HttpRoute.getDescriptor()) - .add(ServiceLbPolicy.getDescriptor()) .add(TlsRoute.getDescriptor()) .add(Mesh.getDescriptor()) - .add(GrpcRoute.getDescriptor()) .add(ServiceBinding.getDescriptor()) + .add(Empty.getDescriptor()) + .add(Gateway.getDescriptor()) + .add(ServiceLbPolicy.getDescriptor()) + .add(GrpcRoute.getDescriptor()) .build(); private static final ApiMethodDescriptor< @@ -363,6 +380,354 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse> + listWasmPluginVersionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/ListWasmPluginVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions", + 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(ListWasmPluginVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getWasmPluginVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/GetWasmPluginVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}", + 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(WasmPluginVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createWasmPluginVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/CreateWasmPluginVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions", + 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, "wasmPluginVersionId", request.getWasmPluginVersionId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "wasmPluginVersion", request.getWasmPluginVersion(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateWasmPluginVersionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteWasmPluginVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/DeleteWasmPluginVersion") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}", + 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( + (DeleteWasmPluginVersionRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listWasmPluginsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/ListWasmPlugins") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/wasmPlugins", + 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(ListWasmPluginsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getWasmPluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/GetWasmPlugin") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/wasmPlugins/*}", + 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, "view", request.getViewValue()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(WasmPlugin.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createWasmPluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/CreateWasmPlugin") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/wasmPlugins", + 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, "wasmPluginId", request.getWasmPluginId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("wasmPlugin", request.getWasmPlugin(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateWasmPluginRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateWasmPluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/UpdateWasmPlugin") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{wasmPlugin.name=projects/*/locations/*/wasmPlugins/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "wasmPlugin.name", request.getWasmPlugin().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("wasmPlugin", request.getWasmPlugin(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateWasmPluginRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteWasmPluginMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/DeleteWasmPlugin") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/wasmPlugins/*}", + 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( + (DeleteWasmPluginRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listGatewaysMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -2265,6 +2630,35 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { private final UnaryCallable deleteEndpointPolicyCallable; private final OperationCallable deleteEndpointPolicyOperationCallable; + private final UnaryCallable + listWasmPluginVersionsCallable; + private final UnaryCallable + listWasmPluginVersionsPagedCallable; + private final UnaryCallable + getWasmPluginVersionCallable; + private final UnaryCallable + createWasmPluginVersionCallable; + private final OperationCallable< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationCallable; + private final UnaryCallable + deleteWasmPluginVersionCallable; + private final OperationCallable + deleteWasmPluginVersionOperationCallable; + private final UnaryCallable + listWasmPluginsCallable; + private final UnaryCallable + listWasmPluginsPagedCallable; + private final UnaryCallable getWasmPluginCallable; + private final UnaryCallable createWasmPluginCallable; + private final OperationCallable + createWasmPluginOperationCallable; + private final UnaryCallable updateWasmPluginCallable; + private final OperationCallable + updateWasmPluginOperationCallable; + private final UnaryCallable deleteWasmPluginCallable; + private final OperationCallable + deleteWasmPluginOperationCallable; private final UnaryCallable listGatewaysCallable; private final UnaryCallable listGatewaysPagedCallable; @@ -2527,6 +2921,112 @@ protected HttpJsonNetworkServicesStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listWasmPluginVersionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listWasmPluginVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getWasmPluginVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getWasmPluginVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createWasmPluginVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createWasmPluginVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteWasmPluginVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteWasmPluginVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listWasmPluginsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listWasmPluginsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getWasmPluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getWasmPluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings createWasmPluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createWasmPluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateWasmPluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateWasmPluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "wasm_plugin.name", String.valueOf(request.getWasmPlugin().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteWasmPluginTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteWasmPluginMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listGatewaysTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(listGatewaysMethodDescriptor) @@ -3141,6 +3641,79 @@ protected HttpJsonNetworkServicesStub( settings.deleteEndpointPolicyOperationSettings(), clientContext, httpJsonOperationsStub); + this.listWasmPluginVersionsCallable = + callableFactory.createUnaryCallable( + listWasmPluginVersionsTransportSettings, + settings.listWasmPluginVersionsSettings(), + clientContext); + this.listWasmPluginVersionsPagedCallable = + callableFactory.createPagedCallable( + listWasmPluginVersionsTransportSettings, + settings.listWasmPluginVersionsSettings(), + clientContext); + this.getWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + getWasmPluginVersionTransportSettings, + settings.getWasmPluginVersionSettings(), + clientContext); + this.createWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + createWasmPluginVersionTransportSettings, + settings.createWasmPluginVersionSettings(), + clientContext); + this.createWasmPluginVersionOperationCallable = + callableFactory.createOperationCallable( + createWasmPluginVersionTransportSettings, + settings.createWasmPluginVersionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteWasmPluginVersionCallable = + callableFactory.createUnaryCallable( + deleteWasmPluginVersionTransportSettings, + settings.deleteWasmPluginVersionSettings(), + clientContext); + this.deleteWasmPluginVersionOperationCallable = + callableFactory.createOperationCallable( + deleteWasmPluginVersionTransportSettings, + settings.deleteWasmPluginVersionOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listWasmPluginsCallable = + callableFactory.createUnaryCallable( + listWasmPluginsTransportSettings, settings.listWasmPluginsSettings(), clientContext); + this.listWasmPluginsPagedCallable = + callableFactory.createPagedCallable( + listWasmPluginsTransportSettings, settings.listWasmPluginsSettings(), clientContext); + this.getWasmPluginCallable = + callableFactory.createUnaryCallable( + getWasmPluginTransportSettings, settings.getWasmPluginSettings(), clientContext); + this.createWasmPluginCallable = + callableFactory.createUnaryCallable( + createWasmPluginTransportSettings, settings.createWasmPluginSettings(), clientContext); + this.createWasmPluginOperationCallable = + callableFactory.createOperationCallable( + createWasmPluginTransportSettings, + settings.createWasmPluginOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateWasmPluginCallable = + callableFactory.createUnaryCallable( + updateWasmPluginTransportSettings, settings.updateWasmPluginSettings(), clientContext); + this.updateWasmPluginOperationCallable = + callableFactory.createOperationCallable( + updateWasmPluginTransportSettings, + settings.updateWasmPluginOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteWasmPluginCallable = + callableFactory.createUnaryCallable( + deleteWasmPluginTransportSettings, settings.deleteWasmPluginSettings(), clientContext); + this.deleteWasmPluginOperationCallable = + callableFactory.createOperationCallable( + deleteWasmPluginTransportSettings, + settings.deleteWasmPluginOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listGatewaysCallable = callableFactory.createUnaryCallable( listGatewaysTransportSettings, settings.listGatewaysSettings(), clientContext); @@ -3514,6 +4087,15 @@ public static List getMethodDescriptors() { methodDescriptors.add(createEndpointPolicyMethodDescriptor); methodDescriptors.add(updateEndpointPolicyMethodDescriptor); methodDescriptors.add(deleteEndpointPolicyMethodDescriptor); + methodDescriptors.add(listWasmPluginVersionsMethodDescriptor); + methodDescriptors.add(getWasmPluginVersionMethodDescriptor); + methodDescriptors.add(createWasmPluginVersionMethodDescriptor); + methodDescriptors.add(deleteWasmPluginVersionMethodDescriptor); + methodDescriptors.add(listWasmPluginsMethodDescriptor); + methodDescriptors.add(getWasmPluginMethodDescriptor); + methodDescriptors.add(createWasmPluginMethodDescriptor); + methodDescriptors.add(updateWasmPluginMethodDescriptor); + methodDescriptors.add(deleteWasmPluginMethodDescriptor); methodDescriptors.add(listGatewaysMethodDescriptor); methodDescriptors.add(getGatewayMethodDescriptor); methodDescriptors.add(createGatewayMethodDescriptor); @@ -3620,6 +4202,97 @@ public UnaryCallable deleteEndpointPolic return deleteEndpointPolicyOperationCallable; } + @Override + public UnaryCallable + listWasmPluginVersionsCallable() { + return listWasmPluginVersionsCallable; + } + + @Override + public UnaryCallable + listWasmPluginVersionsPagedCallable() { + return listWasmPluginVersionsPagedCallable; + } + + @Override + public UnaryCallable + getWasmPluginVersionCallable() { + return getWasmPluginVersionCallable; + } + + @Override + public UnaryCallable + createWasmPluginVersionCallable() { + return createWasmPluginVersionCallable; + } + + @Override + public OperationCallable + createWasmPluginVersionOperationCallable() { + return createWasmPluginVersionOperationCallable; + } + + @Override + public UnaryCallable + deleteWasmPluginVersionCallable() { + return deleteWasmPluginVersionCallable; + } + + @Override + public OperationCallable + deleteWasmPluginVersionOperationCallable() { + return deleteWasmPluginVersionOperationCallable; + } + + @Override + public UnaryCallable listWasmPluginsCallable() { + return listWasmPluginsCallable; + } + + @Override + public UnaryCallable + listWasmPluginsPagedCallable() { + return listWasmPluginsPagedCallable; + } + + @Override + public UnaryCallable getWasmPluginCallable() { + return getWasmPluginCallable; + } + + @Override + public UnaryCallable createWasmPluginCallable() { + return createWasmPluginCallable; + } + + @Override + public OperationCallable + createWasmPluginOperationCallable() { + return createWasmPluginOperationCallable; + } + + @Override + public UnaryCallable updateWasmPluginCallable() { + return updateWasmPluginCallable; + } + + @Override + public OperationCallable + updateWasmPluginOperationCallable() { + return updateWasmPluginOperationCallable; + } + + @Override + public UnaryCallable deleteWasmPluginCallable() { + return deleteWasmPluginCallable; + } + + @Override + public OperationCallable + deleteWasmPluginOperationCallable() { + return deleteWasmPluginOperationCallable; + } + @Override public UnaryCallable listGatewaysCallable() { return listGatewaysCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java index 072ef8c789fb..d458f5879554 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; @@ -45,6 +47,8 @@ import com.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.CreateTcpRouteRequest; import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -54,6 +58,8 @@ import com.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.DeleteTcpRouteRequest; import com.google.cloud.networkservices.v1.DeleteTlsRouteRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; @@ -68,6 +74,8 @@ import com.google.cloud.networkservices.v1.GetServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.GetTcpRouteRequest; import com.google.cloud.networkservices.v1.GetTlsRouteRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; @@ -92,6 +100,10 @@ import com.google.cloud.networkservices.v1.ListTcpRoutesResponse; import com.google.cloud.networkservices.v1.ListTlsRoutesRequest; import com.google.cloud.networkservices.v1.ListTlsRoutesResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginsResponse; import com.google.cloud.networkservices.v1.Mesh; import com.google.cloud.networkservices.v1.MeshRouteView; import com.google.cloud.networkservices.v1.OperationMetadata; @@ -108,6 +120,9 @@ import com.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.UpdateTcpRouteRequest; import com.google.cloud.networkservices.v1.UpdateTlsRouteRequest; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginVersion; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -179,6 +194,84 @@ public UnaryCallable deleteEndpointPolic throw new UnsupportedOperationException("Not implemented: deleteEndpointPolicyCallable()"); } + public UnaryCallable + listWasmPluginVersionsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listWasmPluginVersionsPagedCallable()"); + } + + public UnaryCallable + listWasmPluginVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listWasmPluginVersionsCallable()"); + } + + public UnaryCallable + getWasmPluginVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getWasmPluginVersionCallable()"); + } + + public OperationCallable + createWasmPluginVersionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createWasmPluginVersionOperationCallable()"); + } + + public UnaryCallable + createWasmPluginVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createWasmPluginVersionCallable()"); + } + + public OperationCallable + deleteWasmPluginVersionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteWasmPluginVersionOperationCallable()"); + } + + public UnaryCallable + deleteWasmPluginVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteWasmPluginVersionCallable()"); + } + + public UnaryCallable + listWasmPluginsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listWasmPluginsPagedCallable()"); + } + + public UnaryCallable listWasmPluginsCallable() { + throw new UnsupportedOperationException("Not implemented: listWasmPluginsCallable()"); + } + + public UnaryCallable getWasmPluginCallable() { + throw new UnsupportedOperationException("Not implemented: getWasmPluginCallable()"); + } + + public OperationCallable + createWasmPluginOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createWasmPluginOperationCallable()"); + } + + public UnaryCallable createWasmPluginCallable() { + throw new UnsupportedOperationException("Not implemented: createWasmPluginCallable()"); + } + + public OperationCallable + updateWasmPluginOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateWasmPluginOperationCallable()"); + } + + public UnaryCallable updateWasmPluginCallable() { + throw new UnsupportedOperationException("Not implemented: updateWasmPluginCallable()"); + } + + public OperationCallable + deleteWasmPluginOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteWasmPluginOperationCallable()"); + } + + public UnaryCallable deleteWasmPluginCallable() { + throw new UnsupportedOperationException("Not implemented: deleteWasmPluginCallable()"); + } + public UnaryCallable listGatewaysPagedCallable() { throw new UnsupportedOperationException("Not implemented: listGatewaysPagedCallable()"); } diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java index 26a76ec43466..5386793d244f 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; @@ -72,6 +74,8 @@ import com.google.cloud.networkservices.v1.CreateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.CreateTcpRouteRequest; import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -81,6 +85,8 @@ import com.google.cloud.networkservices.v1.DeleteServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.DeleteTcpRouteRequest; import com.google.cloud.networkservices.v1.DeleteTlsRouteRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; @@ -95,6 +101,8 @@ import com.google.cloud.networkservices.v1.GetServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.GetTcpRouteRequest; import com.google.cloud.networkservices.v1.GetTlsRouteRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; @@ -119,6 +127,10 @@ import com.google.cloud.networkservices.v1.ListTcpRoutesResponse; import com.google.cloud.networkservices.v1.ListTlsRoutesRequest; import com.google.cloud.networkservices.v1.ListTlsRoutesResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse; +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginsResponse; import com.google.cloud.networkservices.v1.Mesh; import com.google.cloud.networkservices.v1.MeshRouteView; import com.google.cloud.networkservices.v1.OperationMetadata; @@ -135,6 +147,9 @@ import com.google.cloud.networkservices.v1.UpdateServiceLbPolicyRequest; import com.google.cloud.networkservices.v1.UpdateTcpRouteRequest; import com.google.cloud.networkservices.v1.UpdateTlsRouteRequest; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginVersion; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -255,6 +270,35 @@ public class NetworkServicesStubSettings extends StubSettings deleteEndpointPolicyOperationSettings; + private final PagedCallSettings< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings; + private final UnaryCallSettings + getWasmPluginVersionSettings; + private final UnaryCallSettings + createWasmPluginVersionSettings; + private final OperationCallSettings< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationSettings; + private final UnaryCallSettings + deleteWasmPluginVersionSettings; + private final OperationCallSettings + deleteWasmPluginVersionOperationSettings; + private final PagedCallSettings< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings; + private final UnaryCallSettings getWasmPluginSettings; + private final UnaryCallSettings createWasmPluginSettings; + private final OperationCallSettings + createWasmPluginOperationSettings; + private final UnaryCallSettings updateWasmPluginSettings; + private final OperationCallSettings + updateWasmPluginOperationSettings; + private final UnaryCallSettings deleteWasmPluginSettings; + private final OperationCallSettings + deleteWasmPluginOperationSettings; private final PagedCallSettings< ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse> listGatewaysSettings; @@ -430,6 +474,84 @@ public Iterable extractResources(ListEndpointPoliciesResponse pa } }; + private static final PagedListDescriptor< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion> + LIST_WASM_PLUGIN_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListWasmPluginVersionsRequest, ListWasmPluginVersionsResponse, WasmPluginVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListWasmPluginVersionsRequest injectToken( + ListWasmPluginVersionsRequest payload, String token) { + return ListWasmPluginVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListWasmPluginVersionsRequest injectPageSize( + ListWasmPluginVersionsRequest payload, int pageSize) { + return ListWasmPluginVersionsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListWasmPluginVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListWasmPluginVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListWasmPluginVersionsResponse payload) { + return payload.getWasmPluginVersionsList(); + } + }; + + private static final PagedListDescriptor< + ListWasmPluginsRequest, ListWasmPluginsResponse, WasmPlugin> + LIST_WASM_PLUGINS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListWasmPluginsRequest injectToken( + ListWasmPluginsRequest payload, String token) { + return ListWasmPluginsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListWasmPluginsRequest injectPageSize( + ListWasmPluginsRequest payload, int pageSize) { + return ListWasmPluginsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListWasmPluginsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListWasmPluginsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListWasmPluginsResponse payload) { + return payload.getWasmPluginsList(); + } + }; + private static final PagedListDescriptor LIST_GATEWAYS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -847,6 +969,50 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + LIST_WASM_PLUGIN_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListWasmPluginVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + WasmPluginVersion> + pageContext = + PageContext.create( + callable, LIST_WASM_PLUGIN_VERSIONS_PAGE_STR_DESC, request, context); + return ListWasmPluginVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + LIST_WASM_PLUGINS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListWasmPluginsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_WASM_PLUGINS_PAGE_STR_DESC, request, context); + return ListWasmPluginsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse> LIST_GATEWAYS_PAGE_STR_FACT = @@ -1103,6 +1269,90 @@ public UnaryCallSettings deleteEndpointP return deleteEndpointPolicyOperationSettings; } + /** Returns the object with the settings used for calls to listWasmPluginVersions. */ + public PagedCallSettings< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings() { + return listWasmPluginVersionsSettings; + } + + /** Returns the object with the settings used for calls to getWasmPluginVersion. */ + public UnaryCallSettings + getWasmPluginVersionSettings() { + return getWasmPluginVersionSettings; + } + + /** Returns the object with the settings used for calls to createWasmPluginVersion. */ + public UnaryCallSettings + createWasmPluginVersionSettings() { + return createWasmPluginVersionSettings; + } + + /** Returns the object with the settings used for calls to createWasmPluginVersion. */ + public OperationCallSettings + createWasmPluginVersionOperationSettings() { + return createWasmPluginVersionOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteWasmPluginVersion. */ + public UnaryCallSettings + deleteWasmPluginVersionSettings() { + return deleteWasmPluginVersionSettings; + } + + /** Returns the object with the settings used for calls to deleteWasmPluginVersion. */ + public OperationCallSettings + deleteWasmPluginVersionOperationSettings() { + return deleteWasmPluginVersionOperationSettings; + } + + /** Returns the object with the settings used for calls to listWasmPlugins. */ + public PagedCallSettings< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings() { + return listWasmPluginsSettings; + } + + /** Returns the object with the settings used for calls to getWasmPlugin. */ + public UnaryCallSettings getWasmPluginSettings() { + return getWasmPluginSettings; + } + + /** Returns the object with the settings used for calls to createWasmPlugin. */ + public UnaryCallSettings createWasmPluginSettings() { + return createWasmPluginSettings; + } + + /** Returns the object with the settings used for calls to createWasmPlugin. */ + public OperationCallSettings + createWasmPluginOperationSettings() { + return createWasmPluginOperationSettings; + } + + /** Returns the object with the settings used for calls to updateWasmPlugin. */ + public UnaryCallSettings updateWasmPluginSettings() { + return updateWasmPluginSettings; + } + + /** Returns the object with the settings used for calls to updateWasmPlugin. */ + public OperationCallSettings + updateWasmPluginOperationSettings() { + return updateWasmPluginOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteWasmPlugin. */ + public UnaryCallSettings deleteWasmPluginSettings() { + return deleteWasmPluginSettings; + } + + /** Returns the object with the settings used for calls to deleteWasmPlugin. */ + public OperationCallSettings + deleteWasmPluginOperationSettings() { + return deleteWasmPluginOperationSettings; + } + /** Returns the object with the settings used for calls to listGateways. */ public PagedCallSettings listGatewaysSettings() { @@ -1641,6 +1891,22 @@ protected NetworkServicesStubSettings(Builder settingsBuilder) throws IOExceptio deleteEndpointPolicySettings = settingsBuilder.deleteEndpointPolicySettings().build(); deleteEndpointPolicyOperationSettings = settingsBuilder.deleteEndpointPolicyOperationSettings().build(); + listWasmPluginVersionsSettings = settingsBuilder.listWasmPluginVersionsSettings().build(); + getWasmPluginVersionSettings = settingsBuilder.getWasmPluginVersionSettings().build(); + createWasmPluginVersionSettings = settingsBuilder.createWasmPluginVersionSettings().build(); + createWasmPluginVersionOperationSettings = + settingsBuilder.createWasmPluginVersionOperationSettings().build(); + deleteWasmPluginVersionSettings = settingsBuilder.deleteWasmPluginVersionSettings().build(); + deleteWasmPluginVersionOperationSettings = + settingsBuilder.deleteWasmPluginVersionOperationSettings().build(); + listWasmPluginsSettings = settingsBuilder.listWasmPluginsSettings().build(); + getWasmPluginSettings = settingsBuilder.getWasmPluginSettings().build(); + createWasmPluginSettings = settingsBuilder.createWasmPluginSettings().build(); + createWasmPluginOperationSettings = settingsBuilder.createWasmPluginOperationSettings().build(); + updateWasmPluginSettings = settingsBuilder.updateWasmPluginSettings().build(); + updateWasmPluginOperationSettings = settingsBuilder.updateWasmPluginOperationSettings().build(); + deleteWasmPluginSettings = settingsBuilder.deleteWasmPluginSettings().build(); + deleteWasmPluginOperationSettings = settingsBuilder.deleteWasmPluginOperationSettings().build(); listGatewaysSettings = settingsBuilder.listGatewaysSettings().build(); getGatewaySettings = settingsBuilder.getGatewaySettings().build(); createGatewaySettings = settingsBuilder.createGatewaySettings().build(); @@ -1747,6 +2013,41 @@ public static class Builder extends StubSettings.Builder deleteEndpointPolicyOperationSettings; + private final PagedCallSettings.Builder< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings; + private final UnaryCallSettings.Builder + getWasmPluginVersionSettings; + private final UnaryCallSettings.Builder + createWasmPluginVersionSettings; + private final OperationCallSettings.Builder< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationSettings; + private final UnaryCallSettings.Builder + deleteWasmPluginVersionSettings; + private final OperationCallSettings.Builder< + DeleteWasmPluginVersionRequest, Empty, OperationMetadata> + deleteWasmPluginVersionOperationSettings; + private final PagedCallSettings.Builder< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings; + private final UnaryCallSettings.Builder getWasmPluginSettings; + private final UnaryCallSettings.Builder + createWasmPluginSettings; + private final OperationCallSettings.Builder< + CreateWasmPluginRequest, WasmPlugin, OperationMetadata> + createWasmPluginOperationSettings; + private final UnaryCallSettings.Builder + updateWasmPluginSettings; + private final OperationCallSettings.Builder< + UpdateWasmPluginRequest, WasmPlugin, OperationMetadata> + updateWasmPluginOperationSettings; + private final UnaryCallSettings.Builder + deleteWasmPluginSettings; + private final OperationCallSettings.Builder + deleteWasmPluginOperationSettings; private final PagedCallSettings.Builder< ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse> listGatewaysSettings; @@ -1948,6 +2249,21 @@ protected Builder(ClientContext clientContext) { updateEndpointPolicyOperationSettings = OperationCallSettings.newBuilder(); deleteEndpointPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEndpointPolicyOperationSettings = OperationCallSettings.newBuilder(); + listWasmPluginVersionsSettings = + PagedCallSettings.newBuilder(LIST_WASM_PLUGIN_VERSIONS_PAGE_STR_FACT); + getWasmPluginVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createWasmPluginVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createWasmPluginVersionOperationSettings = OperationCallSettings.newBuilder(); + deleteWasmPluginVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteWasmPluginVersionOperationSettings = OperationCallSettings.newBuilder(); + listWasmPluginsSettings = PagedCallSettings.newBuilder(LIST_WASM_PLUGINS_PAGE_STR_FACT); + getWasmPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createWasmPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createWasmPluginOperationSettings = OperationCallSettings.newBuilder(); + updateWasmPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateWasmPluginOperationSettings = OperationCallSettings.newBuilder(); + deleteWasmPluginSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteWasmPluginOperationSettings = OperationCallSettings.newBuilder(); listGatewaysSettings = PagedCallSettings.newBuilder(LIST_GATEWAYS_PAGE_STR_FACT); getGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -2033,6 +2349,15 @@ protected Builder(ClientContext clientContext) { createEndpointPolicySettings, updateEndpointPolicySettings, deleteEndpointPolicySettings, + listWasmPluginVersionsSettings, + getWasmPluginVersionSettings, + createWasmPluginVersionSettings, + deleteWasmPluginVersionSettings, + listWasmPluginsSettings, + getWasmPluginSettings, + createWasmPluginSettings, + updateWasmPluginSettings, + deleteWasmPluginSettings, listGatewaysSettings, getGatewaySettings, createGatewaySettings, @@ -2099,6 +2424,22 @@ protected Builder(NetworkServicesStubSettings settings) { deleteEndpointPolicySettings = settings.deleteEndpointPolicySettings.toBuilder(); deleteEndpointPolicyOperationSettings = settings.deleteEndpointPolicyOperationSettings.toBuilder(); + listWasmPluginVersionsSettings = settings.listWasmPluginVersionsSettings.toBuilder(); + getWasmPluginVersionSettings = settings.getWasmPluginVersionSettings.toBuilder(); + createWasmPluginVersionSettings = settings.createWasmPluginVersionSettings.toBuilder(); + createWasmPluginVersionOperationSettings = + settings.createWasmPluginVersionOperationSettings.toBuilder(); + deleteWasmPluginVersionSettings = settings.deleteWasmPluginVersionSettings.toBuilder(); + deleteWasmPluginVersionOperationSettings = + settings.deleteWasmPluginVersionOperationSettings.toBuilder(); + listWasmPluginsSettings = settings.listWasmPluginsSettings.toBuilder(); + getWasmPluginSettings = settings.getWasmPluginSettings.toBuilder(); + createWasmPluginSettings = settings.createWasmPluginSettings.toBuilder(); + createWasmPluginOperationSettings = settings.createWasmPluginOperationSettings.toBuilder(); + updateWasmPluginSettings = settings.updateWasmPluginSettings.toBuilder(); + updateWasmPluginOperationSettings = settings.updateWasmPluginOperationSettings.toBuilder(); + deleteWasmPluginSettings = settings.deleteWasmPluginSettings.toBuilder(); + deleteWasmPluginOperationSettings = settings.deleteWasmPluginOperationSettings.toBuilder(); listGatewaysSettings = settings.listGatewaysSettings.toBuilder(); getGatewaySettings = settings.getGatewaySettings.toBuilder(); createGatewaySettings = settings.createGatewaySettings.toBuilder(); @@ -2186,6 +2527,15 @@ protected Builder(NetworkServicesStubSettings settings) { createEndpointPolicySettings, updateEndpointPolicySettings, deleteEndpointPolicySettings, + listWasmPluginVersionsSettings, + getWasmPluginVersionSettings, + createWasmPluginVersionSettings, + deleteWasmPluginVersionSettings, + listWasmPluginsSettings, + getWasmPluginSettings, + createWasmPluginSettings, + updateWasmPluginSettings, + deleteWasmPluginSettings, listGatewaysSettings, getGatewaySettings, createGatewaySettings, @@ -2287,6 +2637,51 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listWasmPluginVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getWasmPluginVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createWasmPluginVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteWasmPluginVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listWasmPluginsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getWasmPluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createWasmPluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateWasmPluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteWasmPluginSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listGatewaysSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -2604,6 +2999,126 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .createWasmPluginVersionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(WasmPluginVersion.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 + .deleteWasmPluginVersionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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 + .createWasmPluginOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(WasmPlugin.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 + .updateWasmPluginOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(WasmPlugin.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 + .deleteWasmPluginOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_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 .createGatewayOperationSettings() .setInitialCallSettings( @@ -3246,6 +3761,94 @@ public Builder applyToAllUnaryMethods( return deleteEndpointPolicyOperationSettings; } + /** Returns the builder for the settings used for calls to listWasmPluginVersions. */ + public PagedCallSettings.Builder< + ListWasmPluginVersionsRequest, + ListWasmPluginVersionsResponse, + ListWasmPluginVersionsPagedResponse> + listWasmPluginVersionsSettings() { + return listWasmPluginVersionsSettings; + } + + /** Returns the builder for the settings used for calls to getWasmPluginVersion. */ + public UnaryCallSettings.Builder + getWasmPluginVersionSettings() { + return getWasmPluginVersionSettings; + } + + /** Returns the builder for the settings used for calls to createWasmPluginVersion. */ + public UnaryCallSettings.Builder + createWasmPluginVersionSettings() { + return createWasmPluginVersionSettings; + } + + /** Returns the builder for the settings used for calls to createWasmPluginVersion. */ + public OperationCallSettings.Builder< + CreateWasmPluginVersionRequest, WasmPluginVersion, OperationMetadata> + createWasmPluginVersionOperationSettings() { + return createWasmPluginVersionOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteWasmPluginVersion. */ + public UnaryCallSettings.Builder + deleteWasmPluginVersionSettings() { + return deleteWasmPluginVersionSettings; + } + + /** Returns the builder for the settings used for calls to deleteWasmPluginVersion. */ + public OperationCallSettings.Builder + deleteWasmPluginVersionOperationSettings() { + return deleteWasmPluginVersionOperationSettings; + } + + /** Returns the builder for the settings used for calls to listWasmPlugins. */ + public PagedCallSettings.Builder< + ListWasmPluginsRequest, ListWasmPluginsResponse, ListWasmPluginsPagedResponse> + listWasmPluginsSettings() { + return listWasmPluginsSettings; + } + + /** Returns the builder for the settings used for calls to getWasmPlugin. */ + public UnaryCallSettings.Builder getWasmPluginSettings() { + return getWasmPluginSettings; + } + + /** Returns the builder for the settings used for calls to createWasmPlugin. */ + public UnaryCallSettings.Builder + createWasmPluginSettings() { + return createWasmPluginSettings; + } + + /** Returns the builder for the settings used for calls to createWasmPlugin. */ + public OperationCallSettings.Builder + createWasmPluginOperationSettings() { + return createWasmPluginOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateWasmPlugin. */ + public UnaryCallSettings.Builder + updateWasmPluginSettings() { + return updateWasmPluginSettings; + } + + /** Returns the builder for the settings used for calls to updateWasmPlugin. */ + public OperationCallSettings.Builder + updateWasmPluginOperationSettings() { + return updateWasmPluginOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteWasmPlugin. */ + public UnaryCallSettings.Builder + deleteWasmPluginSettings() { + return deleteWasmPluginSettings; + } + + /** Returns the builder for the settings used for calls to deleteWasmPlugin. */ + public OperationCallSettings.Builder + deleteWasmPluginOperationSettings() { + return deleteWasmPluginOperationSettings; + } + /** Returns the builder for the settings used for calls to listGateways. */ public PagedCallSettings.Builder< ListGatewaysRequest, ListGatewaysResponse, ListGatewaysPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json b/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json index e3aa1b4ea4ae..73008a954385 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json +++ b/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json @@ -530,6 +530,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.AuthzExtension", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AuthzExtension$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest", "queryAllDeclaredConstructors": true, @@ -728,6 +764,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.CreateWasmPluginRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateWasmPluginRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest", "queryAllDeclaredConstructors": true, @@ -926,6 +1016,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.DeleteWasmPluginRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteWasmPluginRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.EndpointMatcher", "queryAllDeclaredConstructors": true, @@ -1151,6 +1277,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.GetAuthzExtensionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.GetAuthzExtensionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.GetEndpointPolicyRequest", "queryAllDeclaredConstructors": true, @@ -1385,6 +1529,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.GetWasmPluginRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.GetWasmPluginRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.GrpcRoute", "queryAllDeclaredConstructors": true, @@ -2006,6 +2186,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest", "queryAllDeclaredConstructors": true, @@ -2474,6 +2690,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListWasmPluginsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.LoadBalancingScheme", "queryAllDeclaredConstructors": true, @@ -2816,6 +3104,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest", "queryAllDeclaredConstructors": true, @@ -3014,6 +3320,141 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.UpdateWasmPluginRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.UpdateWasmPluginRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$LogConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$LogConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$LogConfig$LogLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$UsedBy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$UsedBy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$VersionDetails", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPlugin$VersionDetails$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPluginVersion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPluginVersion$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WasmPluginView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.WireFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.iam.v1.AuditConfig", "queryAllDeclaredConstructors": true, diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java index 7c51e0c9c5e4..23b5564ad695 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -46,6 +47,7 @@ import com.google.longrunning.Operation; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Struct; @@ -1146,6 +1148,547 @@ public void deleteLbRouteExtensionExceptionTest2() throws Exception { } } + @Test + public void listAuthzExtensionsTest() throws Exception { + AuthzExtension responsesElement = AuthzExtension.newBuilder().build(); + ListAuthzExtensionsResponse expectedResponse = + ListAuthzExtensionsResponse.newBuilder() + .setNextPageToken("") + .addAllAuthzExtensions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAuthzExtensionsPagedResponse pagedListResponse = client.listAuthzExtensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAuthzExtensionsList().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 listAuthzExtensionsExceptionTest() 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.listAuthzExtensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAuthzExtensionsTest2() throws Exception { + AuthzExtension responsesElement = AuthzExtension.newBuilder().build(); + ListAuthzExtensionsResponse expectedResponse = + ListAuthzExtensionsResponse.newBuilder() + .setNextPageToken("") + .addAllAuthzExtensions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAuthzExtensionsPagedResponse pagedListResponse = client.listAuthzExtensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAuthzExtensionsList().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 listAuthzExtensionsExceptionTest2() 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.listAuthzExtensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + + AuthzExtension actualResponse = client.getAuthzExtension(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 getAuthzExtensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + client.getAuthzExtension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAuthzExtensionTest2() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-9172/locations/location-9172/authzExtensions/authzExtension-9172"; + + AuthzExtension actualResponse = client.getAuthzExtension(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 getAuthzExtensionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9172/locations/location-9172/authzExtensions/authzExtension-9172"; + client.getAuthzExtension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + + AuthzExtension actualResponse = + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).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 createAuthzExtensionExceptionTest() 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]"); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAuthzExtensionTest2() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + + AuthzExtension actualResponse = + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).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 createAuthzExtensionExceptionTest2() 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"; + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AuthzExtension authzExtension = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AuthzExtension actualResponse = + client.updateAuthzExtensionAsync(authzExtension, updateMask).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 updateAuthzExtensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AuthzExtension authzExtension = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAuthzExtensionAsync(authzExtension, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAuthzExtensionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + + client.deleteAuthzExtensionAsync(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 deleteAuthzExtensionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + client.deleteAuthzExtensionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAuthzExtensionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-9172/locations/location-9172/authzExtensions/authzExtension-9172"; + + client.deleteAuthzExtensionAsync(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 deleteAuthzExtensionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9172/locations/location-9172/authzExtensions/authzExtension-9172"; + client.deleteAuthzExtensionAsync(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-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java index c7f40e9da1b3..0467af102a11 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.DepServiceClient.ListAuthzExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbRouteExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLbTrafficExtensionsPagedResponse; import static com.google.cloud.networkservices.v1.DepServiceClient.ListLocationsPagedResponse; @@ -45,6 +46,7 @@ import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Struct; @@ -1044,6 +1046,482 @@ public void deleteLbRouteExtensionExceptionTest2() throws Exception { } } + @Test + public void listAuthzExtensionsTest() throws Exception { + AuthzExtension responsesElement = AuthzExtension.newBuilder().build(); + ListAuthzExtensionsResponse expectedResponse = + ListAuthzExtensionsResponse.newBuilder() + .setNextPageToken("") + .addAllAuthzExtensions(Arrays.asList(responsesElement)) + .build(); + mockDepService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAuthzExtensionsPagedResponse pagedListResponse = client.listAuthzExtensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAuthzExtensionsList().get(0), resources.get(0)); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAuthzExtensionsRequest actualRequest = ((ListAuthzExtensionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAuthzExtensionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAuthzExtensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAuthzExtensionsTest2() throws Exception { + AuthzExtension responsesElement = AuthzExtension.newBuilder().build(); + ListAuthzExtensionsResponse expectedResponse = + ListAuthzExtensionsResponse.newBuilder() + .setNextPageToken("") + .addAllAuthzExtensions(Arrays.asList(responsesElement)) + .build(); + mockDepService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAuthzExtensionsPagedResponse pagedListResponse = client.listAuthzExtensions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAuthzExtensionsList().get(0), resources.get(0)); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAuthzExtensionsRequest actualRequest = ((ListAuthzExtensionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAuthzExtensionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAuthzExtensions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + mockDepService.addResponse(expectedResponse); + + AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + + AuthzExtension actualResponse = client.getAuthzExtension(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAuthzExtensionRequest actualRequest = ((GetAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAuthzExtensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + client.getAuthzExtension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAuthzExtensionTest2() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + mockDepService.addResponse(expectedResponse); + + String name = "name3373707"; + + AuthzExtension actualResponse = client.getAuthzExtension(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAuthzExtensionRequest actualRequest = ((GetAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAuthzExtensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + String name = "name3373707"; + client.getAuthzExtension(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDepService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + + AuthzExtension actualResponse = + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAuthzExtensionRequest actualRequest = + ((CreateAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(authzExtension, actualRequest.getAuthzExtension()); + Assert.assertEquals(authzExtensionId, actualRequest.getAuthzExtensionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAuthzExtensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAuthzExtensionTest2() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDepService.addResponse(resultOperation); + + String parent = "parent-995424086"; + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + + AuthzExtension actualResponse = + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAuthzExtensionRequest actualRequest = + ((CreateAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(authzExtension, actualRequest.getAuthzExtension()); + Assert.assertEquals(authzExtensionId, actualRequest.getAuthzExtensionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAuthzExtensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + String parent = "parent-995424086"; + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + client.createAuthzExtensionAsync(parent, authzExtension, authzExtensionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateAuthzExtensionTest() throws Exception { + AuthzExtension expectedResponse = + AuthzExtension.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setLoadBalancingScheme(LoadBalancingScheme.forNumber(0)) + .setAuthority("authority1475610435") + .setService("service1984153269") + .setTimeout(Duration.newBuilder().build()) + .setFailOpen(true) + .setMetadata(Struct.newBuilder().build()) + .addAllForwardHeaders(new ArrayList()) + .setWireFormat(WireFormat.forNumber(0)) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDepService.addResponse(resultOperation); + + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AuthzExtension actualResponse = + client.updateAuthzExtensionAsync(authzExtension, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAuthzExtensionRequest actualRequest = + ((UpdateAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(authzExtension, actualRequest.getAuthzExtension()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAuthzExtensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAuthzExtensionAsync(authzExtension, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAuthzExtensionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDepService.addResponse(resultOperation); + + AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + + client.deleteAuthzExtensionAsync(name).get(); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAuthzExtensionRequest actualRequest = + ((DeleteAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAuthzExtensionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + client.deleteAuthzExtensionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAuthzExtensionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAuthzExtensionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDepService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAuthzExtensionAsync(name).get(); + + List actualRequests = mockDepService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAuthzExtensionRequest actualRequest = + ((DeleteAuthzExtensionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAuthzExtensionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDepService.addException(exception); + + try { + String name = "name3373707"; + client.deleteAuthzExtensionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockDepServiceImpl.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockDepServiceImpl.java index b0fabe9409bb..a46d2096e7ac 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockDepServiceImpl.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockDepServiceImpl.java @@ -279,4 +279,113 @@ public void deleteLbRouteExtension( Exception.class.getName()))); } } + + @Override + public void listAuthzExtensions( + ListAuthzExtensionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAuthzExtensionsResponse) { + requests.add(request); + responseObserver.onNext(((ListAuthzExtensionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAuthzExtensions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAuthzExtensionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAuthzExtension( + GetAuthzExtensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AuthzExtension) { + requests.add(request); + responseObserver.onNext(((AuthzExtension) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAuthzExtension, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AuthzExtension.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAuthzExtension( + CreateAuthzExtensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAuthzExtension, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAuthzExtension( + UpdateAuthzExtensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAuthzExtension, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAuthzExtension( + DeleteAuthzExtensionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAuthzExtension, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java index 6492731b4f39..b10c316e6967 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java @@ -169,6 +169,200 @@ public void deleteEndpointPolicy( } } + @Override + public void listWasmPluginVersions( + ListWasmPluginVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListWasmPluginVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListWasmPluginVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListWasmPluginVersions, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListWasmPluginVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getWasmPluginVersion( + GetWasmPluginVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof WasmPluginVersion) { + requests.add(request); + responseObserver.onNext(((WasmPluginVersion) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetWasmPluginVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + WasmPluginVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createWasmPluginVersion( + CreateWasmPluginVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateWasmPluginVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteWasmPluginVersion( + DeleteWasmPluginVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteWasmPluginVersion, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listWasmPlugins( + ListWasmPluginsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListWasmPluginsResponse) { + requests.add(request); + responseObserver.onNext(((ListWasmPluginsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListWasmPlugins, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListWasmPluginsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getWasmPlugin( + GetWasmPluginRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof WasmPlugin) { + requests.add(request); + responseObserver.onNext(((WasmPlugin) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetWasmPlugin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + WasmPlugin.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createWasmPlugin( + CreateWasmPluginRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateWasmPlugin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateWasmPlugin( + UpdateWasmPluginRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateWasmPlugin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteWasmPlugin( + DeleteWasmPluginRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteWasmPlugin, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listGateways( ListGatewaysRequest request, StreamObserver responseObserver) { diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java index c58476748cd5..1f90e039550e 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.httpjson.GaxHttpJsonProperties; @@ -627,6 +629,943 @@ public void deleteEndpointPolicyExceptionTest2() throws Exception { } } + @Test + public void listWasmPluginVersionsTest() throws Exception { + WasmPluginVersion responsesElement = WasmPluginVersion.newBuilder().build(); + ListWasmPluginVersionsResponse expectedResponse = + ListWasmPluginVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPluginVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + ListWasmPluginVersionsPagedResponse pagedListResponse = client.listWasmPluginVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginVersionsList().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 listWasmPluginVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.listWasmPluginVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listWasmPluginVersionsTest2() throws Exception { + WasmPluginVersion responsesElement = WasmPluginVersion.newBuilder().build(); + ListWasmPluginVersionsResponse expectedResponse = + ListWasmPluginVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPluginVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-9167/locations/location-9167/wasmPlugins/wasmPlugin-9167"; + + ListWasmPluginVersionsPagedResponse pagedListResponse = client.listWasmPluginVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginVersionsList().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 listWasmPluginVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9167/locations/location-9167/wasmPlugins/wasmPlugin-9167"; + client.listWasmPluginVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginVersionTest() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + mockService.addResponse(expectedResponse); + + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + + WasmPluginVersion actualResponse = client.getWasmPluginVersion(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 getWasmPluginVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + client.getWasmPluginVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginVersionTest2() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-4691/locations/location-4691/wasmPlugins/wasmPlugin-4691/versions/version-4691"; + + WasmPluginVersion actualResponse = client.getWasmPluginVersion(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 getWasmPluginVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4691/locations/location-4691/wasmPlugins/wasmPlugin-4691/versions/version-4691"; + client.getWasmPluginVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createWasmPluginVersionTest() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + + WasmPluginVersion actualResponse = + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).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 createWasmPluginVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createWasmPluginVersionTest2() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-9167/locations/location-9167/wasmPlugins/wasmPlugin-9167"; + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + + WasmPluginVersion actualResponse = + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).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 createWasmPluginVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-9167/locations/location-9167/wasmPlugins/wasmPlugin-9167"; + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteWasmPluginVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + + client.deleteWasmPluginVersionAsync(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 deleteWasmPluginVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + client.deleteWasmPluginVersionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteWasmPluginVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-4691/locations/location-4691/wasmPlugins/wasmPlugin-4691/versions/version-4691"; + + client.deleteWasmPluginVersionAsync(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 deleteWasmPluginVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-4691/locations/location-4691/wasmPlugins/wasmPlugin-4691/versions/version-4691"; + client.deleteWasmPluginVersionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listWasmPluginsTest() throws Exception { + WasmPlugin responsesElement = WasmPlugin.newBuilder().build(); + ListWasmPluginsResponse expectedResponse = + ListWasmPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPlugins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListWasmPluginsPagedResponse pagedListResponse = client.listWasmPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginsList().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 listWasmPluginsExceptionTest() 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.listWasmPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listWasmPluginsTest2() throws Exception { + WasmPlugin responsesElement = WasmPlugin.newBuilder().build(); + ListWasmPluginsResponse expectedResponse = + ListWasmPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPlugins(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListWasmPluginsPagedResponse pagedListResponse = client.listWasmPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginsList().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 listWasmPluginsExceptionTest2() 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.listWasmPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + WasmPlugin actualResponse = client.getWasmPlugin(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 getWasmPluginExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.getWasmPlugin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginTest2() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-1682/locations/location-1682/wasmPlugins/wasmPlugin-1682"; + + WasmPlugin actualResponse = client.getWasmPlugin(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 getWasmPluginExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1682/locations/location-1682/wasmPlugins/wasmPlugin-1682"; + client.getWasmPlugin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + + WasmPlugin actualResponse = + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).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 createWasmPluginExceptionTest() 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]"); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createWasmPluginTest2() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + + WasmPlugin actualResponse = + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).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 createWasmPluginExceptionTest2() 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"; + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + WasmPlugin wasmPlugin = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + WasmPlugin actualResponse = client.updateWasmPluginAsync(wasmPlugin, updateMask).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 updateWasmPluginExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPlugin wasmPlugin = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateWasmPluginAsync(wasmPlugin, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteWasmPluginTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + client.deleteWasmPluginAsync(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 deleteWasmPluginExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.deleteWasmPluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteWasmPluginTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1682/locations/location-1682/wasmPlugins/wasmPlugin-1682"; + + client.deleteWasmPluginAsync(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 deleteWasmPluginExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1682/locations/location-1682/wasmPlugins/wasmPlugin-1682"; + client.deleteWasmPluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listGatewaysTest() throws Exception { Gateway responsesElement = Gateway.newBuilder().build(); diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java index 0d9d825f45cd..74ea7180e2b1 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java @@ -28,6 +28,8 @@ import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListServiceLbPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTcpRoutesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListTlsRoutesPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginVersionsPagedResponse; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListWasmPluginsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; @@ -579,6 +581,859 @@ public void deleteEndpointPolicyExceptionTest2() throws Exception { } } + @Test + public void listWasmPluginVersionsTest() throws Exception { + WasmPluginVersion responsesElement = WasmPluginVersion.newBuilder().build(); + ListWasmPluginVersionsResponse expectedResponse = + ListWasmPluginVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPluginVersions(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + ListWasmPluginVersionsPagedResponse pagedListResponse = client.listWasmPluginVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginVersionsList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListWasmPluginVersionsRequest actualRequest = + ((ListWasmPluginVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listWasmPluginVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.listWasmPluginVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listWasmPluginVersionsTest2() throws Exception { + WasmPluginVersion responsesElement = WasmPluginVersion.newBuilder().build(); + ListWasmPluginVersionsResponse expectedResponse = + ListWasmPluginVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPluginVersions(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListWasmPluginVersionsPagedResponse pagedListResponse = client.listWasmPluginVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginVersionsList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListWasmPluginVersionsRequest actualRequest = + ((ListWasmPluginVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listWasmPluginVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + client.listWasmPluginVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginVersionTest() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + mockNetworkServices.addResponse(expectedResponse); + + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + + WasmPluginVersion actualResponse = client.getWasmPluginVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetWasmPluginVersionRequest actualRequest = + ((GetWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getWasmPluginVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + client.getWasmPluginVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginVersionTest2() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String name = "name3373707"; + + WasmPluginVersion actualResponse = client.getWasmPluginVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetWasmPluginVersionRequest actualRequest = + ((GetWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getWasmPluginVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.getWasmPluginVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createWasmPluginVersionTest() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + + WasmPluginVersion actualResponse = + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateWasmPluginVersionRequest actualRequest = + ((CreateWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(wasmPluginVersion, actualRequest.getWasmPluginVersion()); + Assert.assertEquals(wasmPluginVersionId, actualRequest.getWasmPluginVersionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createWasmPluginVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createWasmPluginVersionTest2() throws Exception { + WasmPluginVersion expectedResponse = + WasmPluginVersion.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setImageUri("imageUri-859610607") + .setImageDigest("imageDigest1735426815") + .setPluginConfigDigest("pluginConfigDigest1647092345") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String parent = "parent-995424086"; + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + + WasmPluginVersion actualResponse = + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateWasmPluginVersionRequest actualRequest = + ((CreateWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(wasmPluginVersion, actualRequest.getWasmPluginVersion()); + Assert.assertEquals(wasmPluginVersionId, actualRequest.getWasmPluginVersionId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createWasmPluginVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + client.createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteWasmPluginVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + + client.deleteWasmPluginVersionAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteWasmPluginVersionRequest actualRequest = + ((DeleteWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteWasmPluginVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + client.deleteWasmPluginVersionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteWasmPluginVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginVersionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteWasmPluginVersionAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteWasmPluginVersionRequest actualRequest = + ((DeleteWasmPluginVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteWasmPluginVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.deleteWasmPluginVersionAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listWasmPluginsTest() throws Exception { + WasmPlugin responsesElement = WasmPlugin.newBuilder().build(); + ListWasmPluginsResponse expectedResponse = + ListWasmPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPlugins(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListWasmPluginsPagedResponse pagedListResponse = client.listWasmPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginsList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListWasmPluginsRequest actualRequest = ((ListWasmPluginsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listWasmPluginsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listWasmPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listWasmPluginsTest2() throws Exception { + WasmPlugin responsesElement = WasmPlugin.newBuilder().build(); + ListWasmPluginsResponse expectedResponse = + ListWasmPluginsResponse.newBuilder() + .setNextPageToken("") + .addAllWasmPlugins(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListWasmPluginsPagedResponse pagedListResponse = client.listWasmPlugins(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWasmPluginsList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListWasmPluginsRequest actualRequest = ((ListWasmPluginsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listWasmPluginsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + client.listWasmPlugins(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + WasmPlugin actualResponse = client.getWasmPlugin(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetWasmPluginRequest actualRequest = ((GetWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getWasmPluginExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.getWasmPlugin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWasmPluginTest2() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String name = "name3373707"; + + WasmPlugin actualResponse = client.getWasmPlugin(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetWasmPluginRequest actualRequest = ((GetWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getWasmPluginExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.getWasmPlugin(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + + WasmPlugin actualResponse = + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateWasmPluginRequest actualRequest = ((CreateWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(wasmPlugin, actualRequest.getWasmPlugin()); + Assert.assertEquals(wasmPluginId, actualRequest.getWasmPluginId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createWasmPluginExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createWasmPluginTest2() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String parent = "parent-995424086"; + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + + WasmPlugin actualResponse = + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateWasmPluginRequest actualRequest = ((CreateWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(wasmPlugin, actualRequest.getWasmPlugin()); + Assert.assertEquals(wasmPluginId, actualRequest.getWasmPluginId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createWasmPluginExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + client.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateWasmPluginTest() throws Exception { + WasmPlugin expectedResponse = + WasmPlugin.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .putAllLabels(new HashMap()) + .setMainVersionId("mainVersionId-1526150566") + .setLogConfig(WasmPlugin.LogConfig.newBuilder().build()) + .putAllVersions(new HashMap()) + .addAllUsedBy(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + WasmPlugin actualResponse = client.updateWasmPluginAsync(wasmPlugin, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateWasmPluginRequest actualRequest = ((UpdateWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(wasmPlugin, actualRequest.getWasmPlugin()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateWasmPluginExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateWasmPluginAsync(wasmPlugin, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteWasmPluginTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + + client.deleteWasmPluginAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteWasmPluginRequest actualRequest = ((DeleteWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteWasmPluginExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + client.deleteWasmPluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteWasmPluginTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteWasmPluginTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteWasmPluginAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteWasmPluginRequest actualRequest = ((DeleteWasmPluginRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteWasmPluginExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.deleteWasmPluginAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listGatewaysTest() throws Exception { Gateway responsesElement = Gateway.newBuilder().build(); diff --git a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepServiceGrpc.java b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepServiceGrpc.java index 4c6628b3ea14..eb1dd1e51476 100644 --- a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepServiceGrpc.java +++ b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepServiceGrpc.java @@ -525,6 +525,245 @@ private DepServiceGrpc() {} return getDeleteLbRouteExtensionMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse> + getListAuthzExtensionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAuthzExtensions", + requestType = com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.class, + responseType = com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse> + getListAuthzExtensionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse> + getListAuthzExtensionsMethod; + if ((getListAuthzExtensionsMethod = DepServiceGrpc.getListAuthzExtensionsMethod) == null) { + synchronized (DepServiceGrpc.class) { + if ((getListAuthzExtensionsMethod = DepServiceGrpc.getListAuthzExtensionsMethod) == null) { + DepServiceGrpc.getListAuthzExtensionsMethod = + getListAuthzExtensionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAuthzExtensions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DepServiceMethodDescriptorSupplier("ListAuthzExtensions")) + .build(); + } + } + } + return getListAuthzExtensionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest, + com.google.cloud.networkservices.v1.AuthzExtension> + getGetAuthzExtensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAuthzExtension", + requestType = com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.class, + responseType = com.google.cloud.networkservices.v1.AuthzExtension.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest, + com.google.cloud.networkservices.v1.AuthzExtension> + getGetAuthzExtensionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest, + com.google.cloud.networkservices.v1.AuthzExtension> + getGetAuthzExtensionMethod; + if ((getGetAuthzExtensionMethod = DepServiceGrpc.getGetAuthzExtensionMethod) == null) { + synchronized (DepServiceGrpc.class) { + if ((getGetAuthzExtensionMethod = DepServiceGrpc.getGetAuthzExtensionMethod) == null) { + DepServiceGrpc.getGetAuthzExtensionMethod = + getGetAuthzExtensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAuthzExtension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.AuthzExtension + .getDefaultInstance())) + .setSchemaDescriptor( + new DepServiceMethodDescriptorSupplier("GetAuthzExtension")) + .build(); + } + } + } + return getGetAuthzExtensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest, + com.google.longrunning.Operation> + getCreateAuthzExtensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAuthzExtension", + requestType = com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest, + com.google.longrunning.Operation> + getCreateAuthzExtensionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest, + com.google.longrunning.Operation> + getCreateAuthzExtensionMethod; + if ((getCreateAuthzExtensionMethod = DepServiceGrpc.getCreateAuthzExtensionMethod) == null) { + synchronized (DepServiceGrpc.class) { + if ((getCreateAuthzExtensionMethod = DepServiceGrpc.getCreateAuthzExtensionMethod) + == null) { + DepServiceGrpc.getCreateAuthzExtensionMethod = + getCreateAuthzExtensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAuthzExtension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DepServiceMethodDescriptorSupplier("CreateAuthzExtension")) + .build(); + } + } + } + return getCreateAuthzExtensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest, + com.google.longrunning.Operation> + getUpdateAuthzExtensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAuthzExtension", + requestType = com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest, + com.google.longrunning.Operation> + getUpdateAuthzExtensionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest, + com.google.longrunning.Operation> + getUpdateAuthzExtensionMethod; + if ((getUpdateAuthzExtensionMethod = DepServiceGrpc.getUpdateAuthzExtensionMethod) == null) { + synchronized (DepServiceGrpc.class) { + if ((getUpdateAuthzExtensionMethod = DepServiceGrpc.getUpdateAuthzExtensionMethod) + == null) { + DepServiceGrpc.getUpdateAuthzExtensionMethod = + getUpdateAuthzExtensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAuthzExtension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DepServiceMethodDescriptorSupplier("UpdateAuthzExtension")) + .build(); + } + } + } + return getUpdateAuthzExtensionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest, + com.google.longrunning.Operation> + getDeleteAuthzExtensionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAuthzExtension", + requestType = com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest, + com.google.longrunning.Operation> + getDeleteAuthzExtensionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest, + com.google.longrunning.Operation> + getDeleteAuthzExtensionMethod; + if ((getDeleteAuthzExtensionMethod = DepServiceGrpc.getDeleteAuthzExtensionMethod) == null) { + synchronized (DepServiceGrpc.class) { + if ((getDeleteAuthzExtensionMethod = DepServiceGrpc.getDeleteAuthzExtensionMethod) + == null) { + DepServiceGrpc.getDeleteAuthzExtensionMethod = + getDeleteAuthzExtensionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteAuthzExtension")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DepServiceMethodDescriptorSupplier("DeleteAuthzExtension")) + .build(); + } + } + } + return getDeleteAuthzExtensionMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static DepServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -733,6 +972,80 @@ default void deleteLbRouteExtension( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getDeleteLbRouteExtensionMethod(), responseObserver); } + + /** + * + * + *

+     * Lists `AuthzExtension` resources in a given project and location.
+     * 
+ */ + default void listAuthzExtensions( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAuthzExtensionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `AuthzExtension` resource.
+     * 
+ */ + default void getAuthzExtension( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAuthzExtensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new `AuthzExtension` resource in a given project
+     * and location.
+     * 
+ */ + default void createAuthzExtension( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAuthzExtensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of the specified `AuthzExtension`
+     * resource.
+     * 
+ */ + default void updateAuthzExtension( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAuthzExtensionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `AuthzExtension` resource.
+     * 
+ */ + default void deleteAuthzExtension( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAuthzExtensionMethod(), responseObserver); + } } /** @@ -933,6 +1246,90 @@ public void deleteLbRouteExtension( request, responseObserver); } + + /** + * + * + *
+     * Lists `AuthzExtension` resources in a given project and location.
+     * 
+ */ + public void listAuthzExtensions( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAuthzExtensionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `AuthzExtension` resource.
+     * 
+ */ + public void getAuthzExtension( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAuthzExtensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new `AuthzExtension` resource in a given project
+     * and location.
+     * 
+ */ + public void createAuthzExtension( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAuthzExtensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of the specified `AuthzExtension`
+     * resource.
+     * 
+ */ + public void updateAuthzExtension( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAuthzExtensionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `AuthzExtension` resource.
+     * 
+ */ + public void deleteAuthzExtension( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAuthzExtensionMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1085,6 +1482,73 @@ public com.google.longrunning.Operation deleteLbRouteExtension( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteLbRouteExtensionMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Lists `AuthzExtension` resources in a given project and location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse listAuthzExtensions( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAuthzExtensionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new `AuthzExtension` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createAuthzExtension( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of the specified `AuthzExtension`
+     * resource.
+     * 
+ */ + public com.google.longrunning.Operation updateAuthzExtension( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteAuthzExtension( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAuthzExtensionMethod(), getCallOptions(), request); + } } /** @@ -1237,6 +1701,73 @@ public com.google.longrunning.Operation deleteLbRouteExtension( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteLbRouteExtensionMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Lists `AuthzExtension` resources in a given project and location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse listAuthzExtensions( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAuthzExtensionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new `AuthzExtension` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createAuthzExtension( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of the specified `AuthzExtension`
+     * resource.
+     * 
+ */ + public com.google.longrunning.Operation updateAuthzExtension( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAuthzExtensionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteAuthzExtension( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAuthzExtensionMethod(), getCallOptions(), request); + } } /** @@ -1401,6 +1932,79 @@ protected DepServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDeleteLbRouteExtensionMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Lists `AuthzExtension` resources in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse> + listAuthzExtensions( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAuthzExtensionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.AuthzExtension> + getAuthzExtension(com.google.cloud.networkservices.v1.GetAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAuthzExtensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new `AuthzExtension` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAuthzExtension( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAuthzExtensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of the specified `AuthzExtension`
+     * resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAuthzExtension( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAuthzExtensionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified `AuthzExtension` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAuthzExtension( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAuthzExtensionMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_LB_TRAFFIC_EXTENSIONS = 0; @@ -1413,6 +2017,11 @@ protected DepServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_CREATE_LB_ROUTE_EXTENSION = 7; private static final int METHODID_UPDATE_LB_ROUTE_EXTENSION = 8; private static final int METHODID_DELETE_LB_ROUTE_EXTENSION = 9; + private static final int METHODID_LIST_AUTHZ_EXTENSIONS = 10; + private static final int METHODID_GET_AUTHZ_EXTENSION = 11; + private static final int METHODID_CREATE_AUTHZ_EXTENSION = 12; + private static final int METHODID_UPDATE_AUTHZ_EXTENSION = 13; + private static final int METHODID_DELETE_AUTHZ_EXTENSION = 14; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1487,6 +2096,34 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_AUTHZ_EXTENSIONS: + serviceImpl.listAuthzExtensions( + (com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse>) + responseObserver); + break; + case METHODID_GET_AUTHZ_EXTENSION: + serviceImpl.getAuthzExtension( + (com.google.cloud.networkservices.v1.GetAuthzExtensionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_AUTHZ_EXTENSION: + serviceImpl.createAuthzExtension( + (com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AUTHZ_EXTENSION: + serviceImpl.updateAuthzExtension( + (com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_AUTHZ_EXTENSION: + serviceImpl.deleteAuthzExtension( + (com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1572,6 +2209,38 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_LB_ROUTE_EXTENSION))) + .addMethod( + getListAuthzExtensionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse>( + service, METHODID_LIST_AUTHZ_EXTENSIONS))) + .addMethod( + getGetAuthzExtensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest, + com.google.cloud.networkservices.v1.AuthzExtension>( + service, METHODID_GET_AUTHZ_EXTENSION))) + .addMethod( + getCreateAuthzExtensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_AUTHZ_EXTENSION))) + .addMethod( + getUpdateAuthzExtensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_AUTHZ_EXTENSION))) + .addMethod( + getDeleteAuthzExtensionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_AUTHZ_EXTENSION))) .build(); } @@ -1633,6 +2302,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateLbRouteExtensionMethod()) .addMethod(getUpdateLbRouteExtensionMethod()) .addMethod(getDeleteLbRouteExtensionMethod()) + .addMethod(getListAuthzExtensionsMethod()) + .addMethod(getGetAuthzExtensionMethod()) + .addMethod(getCreateAuthzExtensionMethod()) + .addMethod(getUpdateAuthzExtensionMethod()) + .addMethod(getDeleteAuthzExtensionMethod()) .build(); } } diff --git a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java index 1191e96d5f98..ef042e5f5d75 100644 --- a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java +++ b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java @@ -280,6 +280,437 @@ private NetworkServicesGrpc() {} return getDeleteEndpointPolicyMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + getListWasmPluginVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListWasmPluginVersions", + requestType = com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.class, + responseType = com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + getListWasmPluginVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + getListWasmPluginVersionsMethod; + if ((getListWasmPluginVersionsMethod = NetworkServicesGrpc.getListWasmPluginVersionsMethod) + == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getListWasmPluginVersionsMethod = NetworkServicesGrpc.getListWasmPluginVersionsMethod) + == null) { + NetworkServicesGrpc.getListWasmPluginVersionsMethod = + getListWasmPluginVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListWasmPluginVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("ListWasmPluginVersions")) + .build(); + } + } + } + return getListWasmPluginVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest, + com.google.cloud.networkservices.v1.WasmPluginVersion> + getGetWasmPluginVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetWasmPluginVersion", + requestType = com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.class, + responseType = com.google.cloud.networkservices.v1.WasmPluginVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest, + com.google.cloud.networkservices.v1.WasmPluginVersion> + getGetWasmPluginVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest, + com.google.cloud.networkservices.v1.WasmPluginVersion> + getGetWasmPluginVersionMethod; + if ((getGetWasmPluginVersionMethod = NetworkServicesGrpc.getGetWasmPluginVersionMethod) + == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getGetWasmPluginVersionMethod = NetworkServicesGrpc.getGetWasmPluginVersionMethod) + == null) { + NetworkServicesGrpc.getGetWasmPluginVersionMethod = + getGetWasmPluginVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetWasmPluginVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.WasmPluginVersion + .getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("GetWasmPluginVersion")) + .build(); + } + } + } + return getGetWasmPluginVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest, + com.google.longrunning.Operation> + getCreateWasmPluginVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateWasmPluginVersion", + requestType = com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest, + com.google.longrunning.Operation> + getCreateWasmPluginVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest, + com.google.longrunning.Operation> + getCreateWasmPluginVersionMethod; + if ((getCreateWasmPluginVersionMethod = NetworkServicesGrpc.getCreateWasmPluginVersionMethod) + == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getCreateWasmPluginVersionMethod = + NetworkServicesGrpc.getCreateWasmPluginVersionMethod) + == null) { + NetworkServicesGrpc.getCreateWasmPluginVersionMethod = + getCreateWasmPluginVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateWasmPluginVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("CreateWasmPluginVersion")) + .build(); + } + } + } + return getCreateWasmPluginVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteWasmPluginVersion", + requestType = com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginVersionMethod; + if ((getDeleteWasmPluginVersionMethod = NetworkServicesGrpc.getDeleteWasmPluginVersionMethod) + == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getDeleteWasmPluginVersionMethod = + NetworkServicesGrpc.getDeleteWasmPluginVersionMethod) + == null) { + NetworkServicesGrpc.getDeleteWasmPluginVersionMethod = + getDeleteWasmPluginVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteWasmPluginVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("DeleteWasmPluginVersion")) + .build(); + } + } + } + return getDeleteWasmPluginVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse> + getListWasmPluginsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListWasmPlugins", + requestType = com.google.cloud.networkservices.v1.ListWasmPluginsRequest.class, + responseType = com.google.cloud.networkservices.v1.ListWasmPluginsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse> + getListWasmPluginsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListWasmPluginsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse> + getListWasmPluginsMethod; + if ((getListWasmPluginsMethod = NetworkServicesGrpc.getListWasmPluginsMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getListWasmPluginsMethod = NetworkServicesGrpc.getListWasmPluginsMethod) == null) { + NetworkServicesGrpc.getListWasmPluginsMethod = + getListWasmPluginsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListWasmPlugins")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListWasmPluginsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("ListWasmPlugins")) + .build(); + } + } + } + return getListWasmPluginsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginRequest, + com.google.cloud.networkservices.v1.WasmPlugin> + getGetWasmPluginMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetWasmPlugin", + requestType = com.google.cloud.networkservices.v1.GetWasmPluginRequest.class, + responseType = com.google.cloud.networkservices.v1.WasmPlugin.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginRequest, + com.google.cloud.networkservices.v1.WasmPlugin> + getGetWasmPluginMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetWasmPluginRequest, + com.google.cloud.networkservices.v1.WasmPlugin> + getGetWasmPluginMethod; + if ((getGetWasmPluginMethod = NetworkServicesGrpc.getGetWasmPluginMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getGetWasmPluginMethod = NetworkServicesGrpc.getGetWasmPluginMethod) == null) { + NetworkServicesGrpc.getGetWasmPluginMethod = + getGetWasmPluginMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetWasmPlugin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.GetWasmPluginRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("GetWasmPlugin")) + .build(); + } + } + } + return getGetWasmPluginMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginRequest, + com.google.longrunning.Operation> + getCreateWasmPluginMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateWasmPlugin", + requestType = com.google.cloud.networkservices.v1.CreateWasmPluginRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginRequest, + com.google.longrunning.Operation> + getCreateWasmPluginMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateWasmPluginRequest, + com.google.longrunning.Operation> + getCreateWasmPluginMethod; + if ((getCreateWasmPluginMethod = NetworkServicesGrpc.getCreateWasmPluginMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getCreateWasmPluginMethod = NetworkServicesGrpc.getCreateWasmPluginMethod) == null) { + NetworkServicesGrpc.getCreateWasmPluginMethod = + getCreateWasmPluginMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateWasmPlugin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("CreateWasmPlugin")) + .build(); + } + } + } + return getCreateWasmPluginMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest, + com.google.longrunning.Operation> + getUpdateWasmPluginMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateWasmPlugin", + requestType = com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest, + com.google.longrunning.Operation> + getUpdateWasmPluginMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest, + com.google.longrunning.Operation> + getUpdateWasmPluginMethod; + if ((getUpdateWasmPluginMethod = NetworkServicesGrpc.getUpdateWasmPluginMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getUpdateWasmPluginMethod = NetworkServicesGrpc.getUpdateWasmPluginMethod) == null) { + NetworkServicesGrpc.getUpdateWasmPluginMethod = + getUpdateWasmPluginMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateWasmPlugin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("UpdateWasmPlugin")) + .build(); + } + } + } + return getUpdateWasmPluginMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteWasmPlugin", + requestType = com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest, + com.google.longrunning.Operation> + getDeleteWasmPluginMethod; + if ((getDeleteWasmPluginMethod = NetworkServicesGrpc.getDeleteWasmPluginMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getDeleteWasmPluginMethod = NetworkServicesGrpc.getDeleteWasmPluginMethod) == null) { + NetworkServicesGrpc.getDeleteWasmPluginMethod = + getDeleteWasmPluginMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteWasmPlugin")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("DeleteWasmPlugin")) + .build(); + } + } + } + return getDeleteWasmPluginMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.networkservices.v1.ListGatewaysRequest, com.google.cloud.networkservices.v1.ListGatewaysResponse> @@ -2478,12 +2909,147 @@ default void deleteEndpointPolicy( * * *
-     * Lists Gateways in a given project and location.
+     * Lists `WasmPluginVersion` resources in a given project and
+     * location.
      * 
*/ - default void listGateways( - com.google.cloud.networkservices.v1.ListGatewaysRequest request, - io.grpc.stub.StreamObserver + default void listWasmPluginVersions( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListWasmPluginVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPluginVersion` resource.
+     * 
+ */ + default void getWasmPluginVersion( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetWasmPluginVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new `WasmPluginVersion` resource in a given project
+     * and location.
+     * 
+ */ + default void createWasmPluginVersion( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateWasmPluginVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `WasmPluginVersion` resource.
+     * 
+ */ + default void deleteWasmPluginVersion( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteWasmPluginVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists `WasmPlugin` resources in a given project and
+     * location.
+     * 
+ */ + default void listWasmPlugins( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListWasmPluginsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPlugin` resource.
+     * 
+ */ + default void getWasmPlugin( + com.google.cloud.networkservices.v1.GetWasmPluginRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetWasmPluginMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new `WasmPlugin` resource in a given project
+     * and location.
+     * 
+ */ + default void createWasmPlugin( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateWasmPluginMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of the specified `WasmPlugin` resource.
+     * 
+ */ + default void updateWasmPlugin( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateWasmPluginMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `WasmPlugin` resource.
+     * 
+ */ + default void deleteWasmPlugin( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteWasmPluginMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Gateways in a given project and location.
+     * 
+ */ + default void listGateways( + com.google.cloud.networkservices.v1.ListGatewaysRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListGatewaysMethod(), responseObserver); @@ -3222,6 +3788,159 @@ public void deleteEndpointPolicy( responseObserver); } + /** + * + * + *
+     * Lists `WasmPluginVersion` resources in a given project and
+     * location.
+     * 
+ */ + public void listWasmPluginVersions( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListWasmPluginVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPluginVersion` resource.
+     * 
+ */ + public void getWasmPluginVersion( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetWasmPluginVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new `WasmPluginVersion` resource in a given project
+     * and location.
+     * 
+ */ + public void createWasmPluginVersion( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateWasmPluginVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `WasmPluginVersion` resource.
+     * 
+ */ + public void deleteWasmPluginVersion( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteWasmPluginVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists `WasmPlugin` resources in a given project and
+     * location.
+     * 
+ */ + public void listWasmPlugins( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListWasmPluginsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPlugin` resource.
+     * 
+ */ + public void getWasmPlugin( + com.google.cloud.networkservices.v1.GetWasmPluginRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetWasmPluginMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new `WasmPlugin` resource in a given project
+     * and location.
+     * 
+ */ + public void createWasmPlugin( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateWasmPluginMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of the specified `WasmPlugin` resource.
+     * 
+ */ + public void updateWasmPlugin( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateWasmPluginMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified `WasmPlugin` resource.
+     * 
+ */ + public void deleteWasmPlugin( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteWasmPluginMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -3949,75 +4668,197 @@ private NetworkServicesBlockingV2Stub( super(channel, callOptions); } - @java.lang.Override - protected NetworkServicesBlockingV2Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkServicesBlockingV2Stub(channel, callOptions); + @java.lang.Override + protected NetworkServicesBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkServicesBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists EndpointPolicies in a given project and location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse listEndpointPolicies( + com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEndpointPoliciesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single EndpointPolicy.
+     * 
+ */ + public com.google.cloud.networkservices.v1.EndpointPolicy getEndpointPolicy( + com.google.cloud.networkservices.v1.GetEndpointPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEndpointPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new EndpointPolicy in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createEndpointPolicy( + com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEndpointPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single EndpointPolicy.
+     * 
+ */ + public com.google.longrunning.Operation updateEndpointPolicy( + com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateEndpointPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single EndpointPolicy.
+     * 
+ */ + public com.google.longrunning.Operation deleteEndpointPolicy( + com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEndpointPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists `WasmPluginVersion` resources in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + listWasmPluginVersions( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListWasmPluginVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersion( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetWasmPluginVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new `WasmPluginVersion` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createWasmPluginVersion( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateWasmPluginVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteWasmPluginVersion( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteWasmPluginVersionMethod(), getCallOptions(), request); } /** * * *
-     * Lists EndpointPolicies in a given project and location.
+     * Lists `WasmPlugin` resources in a given project and
+     * location.
      * 
*/ - public com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse listEndpointPolicies( - com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest request) { + public com.google.cloud.networkservices.v1.ListWasmPluginsResponse listWasmPlugins( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListEndpointPoliciesMethod(), getCallOptions(), request); + getChannel(), getListWasmPluginsMethod(), getCallOptions(), request); } /** * * *
-     * Gets details of a single EndpointPolicy.
+     * Gets details of the specified `WasmPlugin` resource.
      * 
*/ - public com.google.cloud.networkservices.v1.EndpointPolicy getEndpointPolicy( - com.google.cloud.networkservices.v1.GetEndpointPolicyRequest request) { + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin( + com.google.cloud.networkservices.v1.GetWasmPluginRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetEndpointPolicyMethod(), getCallOptions(), request); + getChannel(), getGetWasmPluginMethod(), getCallOptions(), request); } /** * * *
-     * Creates a new EndpointPolicy in a given project and location.
+     * Creates a new `WasmPlugin` resource in a given project
+     * and location.
      * 
*/ - public com.google.longrunning.Operation createEndpointPolicy( - com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest request) { + public com.google.longrunning.Operation createWasmPlugin( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateEndpointPolicyMethod(), getCallOptions(), request); + getChannel(), getCreateWasmPluginMethod(), getCallOptions(), request); } /** * * *
-     * Updates the parameters of a single EndpointPolicy.
+     * Updates the parameters of the specified `WasmPlugin` resource.
      * 
*/ - public com.google.longrunning.Operation updateEndpointPolicy( - com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest request) { + public com.google.longrunning.Operation updateWasmPlugin( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateEndpointPolicyMethod(), getCallOptions(), request); + getChannel(), getUpdateWasmPluginMethod(), getCallOptions(), request); } /** * * *
-     * Deletes a single EndpointPolicy.
+     * Deletes the specified `WasmPlugin` resource.
      * 
*/ - public com.google.longrunning.Operation deleteEndpointPolicy( - com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest request) { + public com.google.longrunning.Operation deleteWasmPlugin( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteEndpointPolicyMethod(), getCallOptions(), request); + getChannel(), getDeleteWasmPluginMethod(), getCallOptions(), request); } /** @@ -4677,6 +5518,128 @@ public com.google.longrunning.Operation deleteEndpointPolicy( getChannel(), getDeleteEndpointPolicyMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists `WasmPluginVersion` resources in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + listWasmPluginVersions( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListWasmPluginVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersion( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetWasmPluginVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new `WasmPluginVersion` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createWasmPluginVersion( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateWasmPluginVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteWasmPluginVersion( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteWasmPluginVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists `WasmPlugin` resources in a given project and
+     * location.
+     * 
+ */ + public com.google.cloud.networkservices.v1.ListWasmPluginsResponse listWasmPlugins( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListWasmPluginsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin( + com.google.cloud.networkservices.v1.GetWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetWasmPluginMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new `WasmPlugin` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.longrunning.Operation createWasmPlugin( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateWasmPluginMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.longrunning.Operation updateWasmPlugin( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateWasmPluginMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteWasmPlugin( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteWasmPluginMethod(), getCallOptions(), request); + } + /** * * @@ -5340,6 +6303,135 @@ protected NetworkServicesFutureStub build( getChannel().newCall(getDeleteEndpointPolicyMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Lists `WasmPluginVersion` resources in a given project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse> + listWasmPluginVersions( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListWasmPluginVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.WasmPluginVersion> + getWasmPluginVersion( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetWasmPluginVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new `WasmPluginVersion` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createWasmPluginVersion( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateWasmPluginVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified `WasmPluginVersion` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteWasmPluginVersion( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteWasmPluginVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists `WasmPlugin` resources in a given project and
+     * location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.ListWasmPluginsResponse> + listWasmPlugins(com.google.cloud.networkservices.v1.ListWasmPluginsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListWasmPluginsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.WasmPlugin> + getWasmPlugin(com.google.cloud.networkservices.v1.GetWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetWasmPluginMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new `WasmPlugin` resource in a given project
+     * and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createWasmPlugin(com.google.cloud.networkservices.v1.CreateWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateWasmPluginMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateWasmPlugin(com.google.cloud.networkservices.v1.UpdateWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateWasmPluginMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified `WasmPlugin` resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteWasmPlugin(com.google.cloud.networkservices.v1.DeleteWasmPluginRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteWasmPluginMethod(), getCallOptions()), request); + } + /** * * @@ -5948,50 +7040,59 @@ protected NetworkServicesFutureStub build( private static final int METHODID_CREATE_ENDPOINT_POLICY = 2; private static final int METHODID_UPDATE_ENDPOINT_POLICY = 3; private static final int METHODID_DELETE_ENDPOINT_POLICY = 4; - private static final int METHODID_LIST_GATEWAYS = 5; - private static final int METHODID_GET_GATEWAY = 6; - private static final int METHODID_CREATE_GATEWAY = 7; - private static final int METHODID_UPDATE_GATEWAY = 8; - private static final int METHODID_DELETE_GATEWAY = 9; - private static final int METHODID_LIST_GRPC_ROUTES = 10; - private static final int METHODID_GET_GRPC_ROUTE = 11; - private static final int METHODID_CREATE_GRPC_ROUTE = 12; - private static final int METHODID_UPDATE_GRPC_ROUTE = 13; - private static final int METHODID_DELETE_GRPC_ROUTE = 14; - private static final int METHODID_LIST_HTTP_ROUTES = 15; - private static final int METHODID_GET_HTTP_ROUTE = 16; - private static final int METHODID_CREATE_HTTP_ROUTE = 17; - private static final int METHODID_UPDATE_HTTP_ROUTE = 18; - private static final int METHODID_DELETE_HTTP_ROUTE = 19; - private static final int METHODID_LIST_TCP_ROUTES = 20; - private static final int METHODID_GET_TCP_ROUTE = 21; - private static final int METHODID_CREATE_TCP_ROUTE = 22; - private static final int METHODID_UPDATE_TCP_ROUTE = 23; - private static final int METHODID_DELETE_TCP_ROUTE = 24; - private static final int METHODID_LIST_TLS_ROUTES = 25; - private static final int METHODID_GET_TLS_ROUTE = 26; - private static final int METHODID_CREATE_TLS_ROUTE = 27; - private static final int METHODID_UPDATE_TLS_ROUTE = 28; - private static final int METHODID_DELETE_TLS_ROUTE = 29; - private static final int METHODID_LIST_SERVICE_BINDINGS = 30; - private static final int METHODID_GET_SERVICE_BINDING = 31; - private static final int METHODID_CREATE_SERVICE_BINDING = 32; - private static final int METHODID_UPDATE_SERVICE_BINDING = 33; - private static final int METHODID_DELETE_SERVICE_BINDING = 34; - private static final int METHODID_LIST_MESHES = 35; - private static final int METHODID_GET_MESH = 36; - private static final int METHODID_CREATE_MESH = 37; - private static final int METHODID_UPDATE_MESH = 38; - private static final int METHODID_DELETE_MESH = 39; - private static final int METHODID_LIST_SERVICE_LB_POLICIES = 40; - private static final int METHODID_GET_SERVICE_LB_POLICY = 41; - private static final int METHODID_CREATE_SERVICE_LB_POLICY = 42; - private static final int METHODID_UPDATE_SERVICE_LB_POLICY = 43; - private static final int METHODID_DELETE_SERVICE_LB_POLICY = 44; - private static final int METHODID_GET_GATEWAY_ROUTE_VIEW = 45; - private static final int METHODID_GET_MESH_ROUTE_VIEW = 46; - private static final int METHODID_LIST_GATEWAY_ROUTE_VIEWS = 47; - private static final int METHODID_LIST_MESH_ROUTE_VIEWS = 48; + private static final int METHODID_LIST_WASM_PLUGIN_VERSIONS = 5; + private static final int METHODID_GET_WASM_PLUGIN_VERSION = 6; + private static final int METHODID_CREATE_WASM_PLUGIN_VERSION = 7; + private static final int METHODID_DELETE_WASM_PLUGIN_VERSION = 8; + private static final int METHODID_LIST_WASM_PLUGINS = 9; + private static final int METHODID_GET_WASM_PLUGIN = 10; + private static final int METHODID_CREATE_WASM_PLUGIN = 11; + private static final int METHODID_UPDATE_WASM_PLUGIN = 12; + private static final int METHODID_DELETE_WASM_PLUGIN = 13; + private static final int METHODID_LIST_GATEWAYS = 14; + private static final int METHODID_GET_GATEWAY = 15; + private static final int METHODID_CREATE_GATEWAY = 16; + private static final int METHODID_UPDATE_GATEWAY = 17; + private static final int METHODID_DELETE_GATEWAY = 18; + private static final int METHODID_LIST_GRPC_ROUTES = 19; + private static final int METHODID_GET_GRPC_ROUTE = 20; + private static final int METHODID_CREATE_GRPC_ROUTE = 21; + private static final int METHODID_UPDATE_GRPC_ROUTE = 22; + private static final int METHODID_DELETE_GRPC_ROUTE = 23; + private static final int METHODID_LIST_HTTP_ROUTES = 24; + private static final int METHODID_GET_HTTP_ROUTE = 25; + private static final int METHODID_CREATE_HTTP_ROUTE = 26; + private static final int METHODID_UPDATE_HTTP_ROUTE = 27; + private static final int METHODID_DELETE_HTTP_ROUTE = 28; + private static final int METHODID_LIST_TCP_ROUTES = 29; + private static final int METHODID_GET_TCP_ROUTE = 30; + private static final int METHODID_CREATE_TCP_ROUTE = 31; + private static final int METHODID_UPDATE_TCP_ROUTE = 32; + private static final int METHODID_DELETE_TCP_ROUTE = 33; + private static final int METHODID_LIST_TLS_ROUTES = 34; + private static final int METHODID_GET_TLS_ROUTE = 35; + private static final int METHODID_CREATE_TLS_ROUTE = 36; + private static final int METHODID_UPDATE_TLS_ROUTE = 37; + private static final int METHODID_DELETE_TLS_ROUTE = 38; + private static final int METHODID_LIST_SERVICE_BINDINGS = 39; + private static final int METHODID_GET_SERVICE_BINDING = 40; + private static final int METHODID_CREATE_SERVICE_BINDING = 41; + private static final int METHODID_UPDATE_SERVICE_BINDING = 42; + private static final int METHODID_DELETE_SERVICE_BINDING = 43; + private static final int METHODID_LIST_MESHES = 44; + private static final int METHODID_GET_MESH = 45; + private static final int METHODID_CREATE_MESH = 46; + private static final int METHODID_UPDATE_MESH = 47; + private static final int METHODID_DELETE_MESH = 48; + private static final int METHODID_LIST_SERVICE_LB_POLICIES = 49; + private static final int METHODID_GET_SERVICE_LB_POLICY = 50; + private static final int METHODID_CREATE_SERVICE_LB_POLICY = 51; + private static final int METHODID_UPDATE_SERVICE_LB_POLICY = 52; + private static final int METHODID_DELETE_SERVICE_LB_POLICY = 53; + private static final int METHODID_GET_GATEWAY_ROUTE_VIEW = 54; + private static final int METHODID_GET_MESH_ROUTE_VIEW = 55; + private static final int METHODID_LIST_GATEWAY_ROUTE_VIEWS = 56; + private static final int METHODID_LIST_MESH_ROUTE_VIEWS = 57; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -6038,6 +7139,57 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_WASM_PLUGIN_VERSIONS: + serviceImpl.listWasmPluginVersions( + (com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse>) + responseObserver); + break; + case METHODID_GET_WASM_PLUGIN_VERSION: + serviceImpl.getWasmPluginVersion( + (com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_WASM_PLUGIN_VERSION: + serviceImpl.createWasmPluginVersion( + (com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_WASM_PLUGIN_VERSION: + serviceImpl.deleteWasmPluginVersion( + (com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_WASM_PLUGINS: + serviceImpl.listWasmPlugins( + (com.google.cloud.networkservices.v1.ListWasmPluginsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListWasmPluginsResponse>) + responseObserver); + break; + case METHODID_GET_WASM_PLUGIN: + serviceImpl.getWasmPlugin( + (com.google.cloud.networkservices.v1.GetWasmPluginRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_WASM_PLUGIN: + serviceImpl.createWasmPlugin( + (com.google.cloud.networkservices.v1.CreateWasmPluginRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_WASM_PLUGIN: + serviceImpl.updateWasmPlugin( + (com.google.cloud.networkservices.v1.UpdateWasmPluginRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_WASM_PLUGIN: + serviceImpl.deleteWasmPlugin( + (com.google.cloud.networkservices.v1.DeleteWasmPluginRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_LIST_GATEWAYS: serviceImpl.listGateways( (com.google.cloud.networkservices.v1.ListGatewaysRequest) request, @@ -6337,6 +7489,66 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_ENDPOINT_POLICY))) + .addMethod( + getListWasmPluginVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse>( + service, METHODID_LIST_WASM_PLUGIN_VERSIONS))) + .addMethod( + getGetWasmPluginVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest, + com.google.cloud.networkservices.v1.WasmPluginVersion>( + service, METHODID_GET_WASM_PLUGIN_VERSION))) + .addMethod( + getCreateWasmPluginVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_WASM_PLUGIN_VERSION))) + .addMethod( + getDeleteWasmPluginVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_WASM_PLUGIN_VERSION))) + .addMethod( + getListWasmPluginsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.ListWasmPluginsRequest, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse>( + service, METHODID_LIST_WASM_PLUGINS))) + .addMethod( + getGetWasmPluginMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.GetWasmPluginRequest, + com.google.cloud.networkservices.v1.WasmPlugin>( + service, METHODID_GET_WASM_PLUGIN))) + .addMethod( + getCreateWasmPluginMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.CreateWasmPluginRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_WASM_PLUGIN))) + .addMethod( + getUpdateWasmPluginMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_WASM_PLUGIN))) + .addMethod( + getDeleteWasmPluginMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_WASM_PLUGIN))) .addMethod( getListGatewaysMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -6673,6 +7885,15 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateEndpointPolicyMethod()) .addMethod(getUpdateEndpointPolicyMethod()) .addMethod(getDeleteEndpointPolicyMethod()) + .addMethod(getListWasmPluginVersionsMethod()) + .addMethod(getGetWasmPluginVersionMethod()) + .addMethod(getCreateWasmPluginVersionMethod()) + .addMethod(getDeleteWasmPluginVersionMethod()) + .addMethod(getListWasmPluginsMethod()) + .addMethod(getGetWasmPluginMethod()) + .addMethod(getCreateWasmPluginMethod()) + .addMethod(getUpdateWasmPluginMethod()) + .addMethod(getDeleteWasmPluginMethod()) .addMethod(getListGatewaysMethod()) .addMethod(getGetGatewayMethod()) .addMethod(getCreateGatewayMethod()) diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java new file mode 100644 index 000000000000..23f7e74b6b88 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java @@ -0,0 +1,3811 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * `AuthzExtension` is a resource that allows traffic forwarding
+ * to a callout backend service to make an authorization decision.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.AuthzExtension} + */ +public final class AuthzExtension extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AuthzExtension) + AuthzExtensionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AuthzExtension.newBuilder() to construct. + private AuthzExtension(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AuthzExtension() { + name_ = ""; + description_ = ""; + loadBalancingScheme_ = 0; + authority_ = ""; + service_ = ""; + forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + wireFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AuthzExtension(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AuthzExtension.class, + com.google.cloud.networkservices.v1.AuthzExtension.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. Identifier. Name of the `AuthzExtension` resource in the
+   * following format:
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+   * Required. Identifier. Name of the `AuthzExtension` resource in the
+   * following format:
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.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 LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LOAD_BALANCING_SCHEME_FIELD_NUMBER = 6; + private int loadBalancingScheme_ = 0; + + /** + * + * + *
+   * Required. All backend services and forwarding rules referenced by this
+   * extension must share the same load balancing scheme. Supported values:
+   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+   * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for loadBalancingScheme. + */ + @java.lang.Override + public int getLoadBalancingSchemeValue() { + return loadBalancingScheme_; + } + + /** + * + * + *
+   * Required. All backend services and forwarding rules referenced by this
+   * extension must share the same load balancing scheme. Supported values:
+   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+   * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loadBalancingScheme. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingScheme() { + com.google.cloud.networkservices.v1.LoadBalancingScheme result = + com.google.cloud.networkservices.v1.LoadBalancingScheme.forNumber(loadBalancingScheme_); + return result == null + ? com.google.cloud.networkservices.v1.LoadBalancingScheme.UNRECOGNIZED + : result; + } + + public static final int AUTHORITY_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object authority_ = ""; + + /** + * + * + *
+   * Required. The `:authority` header in the gRPC request sent from Envoy
+   * to the extension service.
+   * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authority. + */ + @java.lang.Override + public java.lang.String getAuthority() { + java.lang.Object ref = authority_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authority_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The `:authority` header in the gRPC request sent from Envoy
+   * to the extension service.
+   * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authority. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthorityBytes() { + java.lang.Object ref = authority_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + + /** + * + * + *
+   * Required. The reference to the service that runs the extension.
+   *
+   * To configure a callout extension, `service` must be a fully-qualified
+   * reference
+   * to a [backend
+   * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+   * in the format:
+   * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+   * or
+   * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+   * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The reference to the service that runs the extension.
+   *
+   * To configure a callout extension, `service` must be a fully-qualified
+   * reference
+   * to a [backend
+   * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+   * in the format:
+   * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+   * or
+   * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+   * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMEOUT_FIELD_NUMBER = 9; + private com.google.protobuf.Duration timeout_; + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeout field is set. + */ + @java.lang.Override + public boolean hasTimeout() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getTimeout() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + + public static final int FAIL_OPEN_FIELD_NUMBER = 10; + private boolean failOpen_ = false; + + /** + * + * + *
+   * Optional. Determines how the proxy behaves if the call to the extension
+   * fails or times out.
+   *
+   * When set to `TRUE`, request or response processing continues without
+   * error. Any subsequent extensions in the extension chain are also
+   * executed. When set to `FALSE` or the default setting of `FALSE` is used,
+   * one of the following happens:
+   *
+   * * If response headers have not been delivered to the downstream client,
+   * a generic 500 error is returned to the client. The error response can be
+   * tailored by configuring a custom error response in the load balancer.
+   *
+   * * If response headers have been delivered, then the HTTP stream to the
+   * downstream client is reset.
+   * 
+ * + * bool fail_open = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The failOpen. + */ + @java.lang.Override + public boolean getFailOpen() { + return failOpen_; + } + + public static final int METADATA_FIELD_NUMBER = 11; + private com.google.protobuf.Struct metadata_; + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetadata() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + + public static final int FORWARD_HEADERS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList forwardHeaders_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the forwardHeaders. + */ + public com.google.protobuf.ProtocolStringList getForwardHeadersList() { + return forwardHeaders_; + } + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of forwardHeaders. + */ + public int getForwardHeadersCount() { + return forwardHeaders_.size(); + } + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The forwardHeaders at the given index. + */ + public java.lang.String getForwardHeaders(int index) { + return forwardHeaders_.get(index); + } + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the forwardHeaders at the given index. + */ + public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { + return forwardHeaders_.getByteString(index); + } + + public static final int WIRE_FORMAT_FIELD_NUMBER = 14; + private int wireFormat_ = 0; + + /** + * + * + *
+   * Optional. The format of communication supported by the callout extension.
+   * If not specified, the default value `EXT_PROC_GRPC` is used.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for wireFormat. + */ + @java.lang.Override + public int getWireFormatValue() { + return wireFormat_; + } + + /** + * + * + *
+   * Optional. The format of communication supported by the callout extension.
+   * If not specified, the default value `EXT_PROC_GRPC` is used.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The wireFormat. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WireFormat getWireFormat() { + com.google.cloud.networkservices.v1.WireFormat result = + com.google.cloud.networkservices.v1.WireFormat.forNumber(wireFormat_); + return result == null ? com.google.cloud.networkservices.v1.WireFormat.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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (loadBalancingScheme_ + != com.google.cloud.networkservices.v1.LoadBalancingScheme.LOAD_BALANCING_SCHEME_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, loadBalancingScheme_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, authority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, service_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getTimeout()); + } + if (failOpen_ != false) { + output.writeBool(10, failOpen_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getMetadata()); + } + for (int i = 0; i < forwardHeaders_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, forwardHeaders_.getRaw(i)); + } + if (wireFormat_ + != com.google.cloud.networkservices.v1.WireFormat.WIRE_FORMAT_UNSPECIFIED.getNumber()) { + output.writeEnum(14, wireFormat_); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + if (loadBalancingScheme_ + != com.google.cloud.networkservices.v1.LoadBalancingScheme.LOAD_BALANCING_SCHEME_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, loadBalancingScheme_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, authority_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, service_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTimeout()); + } + if (failOpen_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, failOpen_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getMetadata()); + } + { + int dataSize = 0; + for (int i = 0; i < forwardHeaders_.size(); i++) { + dataSize += computeStringSizeNoTag(forwardHeaders_.getRaw(i)); + } + size += dataSize; + size += 1 * getForwardHeadersList().size(); + } + if (wireFormat_ + != com.google.cloud.networkservices.v1.WireFormat.WIRE_FORMAT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, wireFormat_); + } + 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.networkservices.v1.AuthzExtension)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AuthzExtension other = + (com.google.cloud.networkservices.v1.AuthzExtension) obj; + + if (!getName().equals(other.getName())) 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 (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (loadBalancingScheme_ != other.loadBalancingScheme_) return false; + if (!getAuthority().equals(other.getAuthority())) return false; + if (!getService().equals(other.getService())) return false; + if (hasTimeout() != other.hasTimeout()) return false; + if (hasTimeout()) { + if (!getTimeout().equals(other.getTimeout())) return false; + } + if (getFailOpen() != other.getFailOpen()) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getForwardHeadersList().equals(other.getForwardHeadersList())) return false; + if (wireFormat_ != other.wireFormat_) 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 (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 = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + LOAD_BALANCING_SCHEME_FIELD_NUMBER; + hash = (53 * hash) + loadBalancingScheme_; + hash = (37 * hash) + AUTHORITY_FIELD_NUMBER; + hash = (53 * hash) + getAuthority().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + if (hasTimeout()) { + hash = (37 * hash) + TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getTimeout().hashCode(); + } + hash = (37 * hash) + FAIL_OPEN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFailOpen()); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (getForwardHeadersCount() > 0) { + hash = (37 * hash) + FORWARD_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getForwardHeadersList().hashCode(); + } + hash = (37 * hash) + WIRE_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + wireFormat_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension 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.networkservices.v1.AuthzExtension parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + 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.networkservices.v1.AuthzExtension parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + java.io.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.networkservices.v1.AuthzExtension parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseDelimitedFrom( + java.io.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.networkservices.v1.AuthzExtension parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.AuthzExtension prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `AuthzExtension` is a resource that allows traffic forwarding
+   * to a callout backend service to make an authorization decision.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.AuthzExtension} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AuthzExtension) + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AuthzExtension.class, + com.google.cloud.networkservices.v1.AuthzExtension.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.AuthzExtension.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getTimeoutFieldBuilder(); + getMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + internalGetMutableLabels().clear(); + loadBalancingScheme_ = 0; + authority_ = ""; + service_ = ""; + timeout_ = null; + if (timeoutBuilder_ != null) { + timeoutBuilder_.dispose(); + timeoutBuilder_ = null; + } + failOpen_ = false; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + wireFormat_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension build() { + com.google.cloud.networkservices.v1.AuthzExtension result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension buildPartial() { + com.google.cloud.networkservices.v1.AuthzExtension result = + new com.google.cloud.networkservices.v1.AuthzExtension(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.AuthzExtension result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.loadBalancingScheme_ = loadBalancingScheme_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.authority_ = authority_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.timeout_ = timeoutBuilder_ == null ? timeout_ : timeoutBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.failOpen_ = failOpen_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + forwardHeaders_.makeImmutable(); + result.forwardHeaders_ = forwardHeaders_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.wireFormat_ = wireFormat_; + } + 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.networkservices.v1.AuthzExtension) { + return mergeFrom((com.google.cloud.networkservices.v1.AuthzExtension) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.AuthzExtension other) { + if (other == com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (other.loadBalancingScheme_ != 0) { + setLoadBalancingSchemeValue(other.getLoadBalancingSchemeValue()); + } + if (!other.getAuthority().isEmpty()) { + authority_ = other.authority_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasTimeout()) { + mergeTimeout(other.getTimeout()); + } + if (other.getFailOpen() != false) { + setFailOpen(other.getFailOpen()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.forwardHeaders_.isEmpty()) { + if (forwardHeaders_.isEmpty()) { + forwardHeaders_ = other.forwardHeaders_; + bitField0_ |= 0x00000800; + } else { + ensureForwardHeadersIsMutable(); + forwardHeaders_.addAll(other.forwardHeaders_); + } + onChanged(); + } + if (other.wireFormat_ != 0) { + setWireFormatValue(other.getWireFormatValue()); + } + 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + loadBalancingScheme_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + authority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 80: + { + failOpen_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForwardHeadersIsMutable(); + forwardHeaders_.add(s); + break; + } // case 98 + case 112: + { + wireFormat_ = input.readEnum(); + bitField0_ |= 0x00001000; + break; + } // case 112 + 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. Identifier. Name of the `AuthzExtension` resource in the
+     * following format:
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+     * Required. Identifier. Name of the `AuthzExtension` resource in the
+     * following format:
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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; + } + } + + /** + * + * + *
+     * Required. Identifier. Name of the `AuthzExtension` resource in the
+     * following format:
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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; + } + + /** + * + * + *
+     * Required. Identifier. Name of the `AuthzExtension` resource in the
+     * following format:
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Identifier. Name of the `AuthzExtension` resource in the
+     * following format:
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.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 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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `AuthzExtension`
+     * resource.
+     *
+     * The format must comply with [the requirements for
+     * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+     * resources.
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private int loadBalancingScheme_ = 0; + + /** + * + * + *
+     * Required. All backend services and forwarding rules referenced by this
+     * extension must share the same load balancing scheme. Supported values:
+     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+     * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for loadBalancingScheme. + */ + @java.lang.Override + public int getLoadBalancingSchemeValue() { + return loadBalancingScheme_; + } + + /** + * + * + *
+     * Required. All backend services and forwarding rules referenced by this
+     * extension must share the same load balancing scheme. Supported values:
+     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+     * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for loadBalancingScheme to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancingSchemeValue(int value) { + loadBalancingScheme_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. All backend services and forwarding rules referenced by this
+     * extension must share the same load balancing scheme. Supported values:
+     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+     * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loadBalancingScheme. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingScheme() { + com.google.cloud.networkservices.v1.LoadBalancingScheme result = + com.google.cloud.networkservices.v1.LoadBalancingScheme.forNumber(loadBalancingScheme_); + return result == null + ? com.google.cloud.networkservices.v1.LoadBalancingScheme.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. All backend services and forwarding rules referenced by this
+     * extension must share the same load balancing scheme. Supported values:
+     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+     * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The loadBalancingScheme to set. + * @return This builder for chaining. + */ + public Builder setLoadBalancingScheme( + com.google.cloud.networkservices.v1.LoadBalancingScheme value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + loadBalancingScheme_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. All backend services and forwarding rules referenced by this
+     * extension must share the same load balancing scheme. Supported values:
+     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+     * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearLoadBalancingScheme() { + bitField0_ = (bitField0_ & ~0x00000020); + loadBalancingScheme_ = 0; + onChanged(); + return this; + } + + private java.lang.Object authority_ = ""; + + /** + * + * + *
+     * Required. The `:authority` header in the gRPC request sent from Envoy
+     * to the extension service.
+     * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authority. + */ + public java.lang.String getAuthority() { + java.lang.Object ref = authority_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authority_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The `:authority` header in the gRPC request sent from Envoy
+     * to the extension service.
+     * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authority. + */ + public com.google.protobuf.ByteString getAuthorityBytes() { + java.lang.Object ref = authority_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authority_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The `:authority` header in the gRPC request sent from Envoy
+     * to the extension service.
+     * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The authority to set. + * @return This builder for chaining. + */ + public Builder setAuthority(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authority_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `:authority` header in the gRPC request sent from Envoy
+     * to the extension service.
+     * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAuthority() { + authority_ = getDefaultInstance().getAuthority(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `:authority` header in the gRPC request sent from Envoy
+     * to the extension service.
+     * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for authority to set. + * @return This builder for chaining. + */ + public Builder setAuthorityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authority_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + + /** + * + * + *
+     * Required. The reference to the service that runs the extension.
+     *
+     * To configure a callout extension, `service` must be a fully-qualified
+     * reference
+     * to a [backend
+     * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+     * in the format:
+     * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+     * or
+     * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The reference to the service that runs the extension.
+     *
+     * To configure a callout extension, `service` must be a fully-qualified
+     * reference
+     * to a [backend
+     * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+     * in the format:
+     * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+     * or
+     * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The reference to the service that runs the extension.
+     *
+     * To configure a callout extension, `service` must be a fully-qualified
+     * reference
+     * to a [backend
+     * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+     * in the format:
+     * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+     * or
+     * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The reference to the service that runs the extension.
+     *
+     * To configure a callout extension, `service` must be a fully-qualified
+     * reference
+     * to a [backend
+     * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+     * in the format:
+     * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+     * or
+     * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The reference to the service that runs the extension.
+     *
+     * To configure a callout extension, `service` must be a fully-qualified
+     * reference
+     * to a [backend
+     * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+     * in the format:
+     * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+     * or
+     * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeoutBuilder_; + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeout field is set. + */ + public boolean hasTimeout() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeout. + */ + public com.google.protobuf.Duration getTimeout() { + if (timeoutBuilder_ == null) { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } else { + return timeoutBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeout_ = value; + } else { + timeoutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (timeoutBuilder_ == null) { + timeout_ = builderForValue.build(); + } else { + timeoutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeTimeout(com.google.protobuf.Duration value) { + if (timeoutBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && timeout_ != null + && timeout_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTimeoutBuilder().mergeFrom(value); + } else { + timeout_ = value; + } + } else { + timeoutBuilder_.mergeFrom(value); + } + if (timeout_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearTimeout() { + bitField0_ = (bitField0_ & ~0x00000100); + timeout_ = null; + if (timeoutBuilder_ != null) { + timeoutBuilder_.dispose(); + timeoutBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Duration.Builder getTimeoutBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getTimeoutFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { + if (timeoutBuilder_ != null) { + return timeoutBuilder_.getMessageOrBuilder(); + } else { + return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_; + } + } + + /** + * + * + *
+     * Required. Specifies the timeout for each individual message on the stream.
+     * The timeout must be between 10-10000 milliseconds.
+     * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeoutFieldBuilder() { + if (timeoutBuilder_ == null) { + timeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeout(), getParentForChildren(), isClean()); + timeout_ = null; + } + return timeoutBuilder_; + } + + private boolean failOpen_; + + /** + * + * + *
+     * Optional. Determines how the proxy behaves if the call to the extension
+     * fails or times out.
+     *
+     * When set to `TRUE`, request or response processing continues without
+     * error. Any subsequent extensions in the extension chain are also
+     * executed. When set to `FALSE` or the default setting of `FALSE` is used,
+     * one of the following happens:
+     *
+     * * If response headers have not been delivered to the downstream client,
+     * a generic 500 error is returned to the client. The error response can be
+     * tailored by configuring a custom error response in the load balancer.
+     *
+     * * If response headers have been delivered, then the HTTP stream to the
+     * downstream client is reset.
+     * 
+ * + * bool fail_open = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The failOpen. + */ + @java.lang.Override + public boolean getFailOpen() { + return failOpen_; + } + + /** + * + * + *
+     * Optional. Determines how the proxy behaves if the call to the extension
+     * fails or times out.
+     *
+     * When set to `TRUE`, request or response processing continues without
+     * error. Any subsequent extensions in the extension chain are also
+     * executed. When set to `FALSE` or the default setting of `FALSE` is used,
+     * one of the following happens:
+     *
+     * * If response headers have not been delivered to the downstream client,
+     * a generic 500 error is returned to the client. The error response can be
+     * tailored by configuring a custom error response in the load balancer.
+     *
+     * * If response headers have been delivered, then the HTTP stream to the
+     * downstream client is reset.
+     * 
+ * + * bool fail_open = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The failOpen to set. + * @return This builder for chaining. + */ + public Builder setFailOpen(boolean value) { + + failOpen_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Determines how the proxy behaves if the call to the extension
+     * fails or times out.
+     *
+     * When set to `TRUE`, request or response processing continues without
+     * error. Any subsequent extensions in the extension chain are also
+     * executed. When set to `FALSE` or the default setting of `FALSE` is used,
+     * one of the following happens:
+     *
+     * * If response headers have not been delivered to the downstream client,
+     * a generic 500 error is returned to the client. The error response can be
+     * tailored by configuring a custom error response in the load balancer.
+     *
+     * * If response headers have been delivered, then the HTTP stream to the
+     * downstream client is reset.
+     * 
+ * + * bool fail_open = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFailOpen() { + bitField0_ = (bitField0_ & ~0x00000200); + failOpen_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metadataBuilder_; + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && metadata_ != null + && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000400); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Struct.Builder getMetadataBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension
+     * server. The metadata is available under the namespace
+     * `com.google.authz_extension.<resource_name>`.
+     * The following variables are supported in the metadata Struct:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.protobuf.LazyStringArrayList forwardHeaders_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureForwardHeadersIsMutable() { + if (!forwardHeaders_.isModifiable()) { + forwardHeaders_ = new com.google.protobuf.LazyStringArrayList(forwardHeaders_); + } + bitField0_ |= 0x00000800; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the forwardHeaders. + */ + public com.google.protobuf.ProtocolStringList getForwardHeadersList() { + forwardHeaders_.makeImmutable(); + return forwardHeaders_; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of forwardHeaders. + */ + public int getForwardHeadersCount() { + return forwardHeaders_.size(); + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The forwardHeaders at the given index. + */ + public java.lang.String getForwardHeaders(int index) { + return forwardHeaders_.get(index); + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the forwardHeaders at the given index. + */ + public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { + return forwardHeaders_.getByteString(index); + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The forwardHeaders to set. + * @return This builder for chaining. + */ + public Builder setForwardHeaders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardHeadersIsMutable(); + forwardHeaders_.set(index, value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The forwardHeaders to add. + * @return This builder for chaining. + */ + public Builder addForwardHeaders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardHeadersIsMutable(); + forwardHeaders_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The forwardHeaders to add. + * @return This builder for chaining. + */ + public Builder addAllForwardHeaders(java.lang.Iterable values) { + ensureForwardHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forwardHeaders_); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForwardHeaders() { + forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. List of the HTTP headers to forward to the extension
+     * (from the client). If omitted, all headers are sent.
+     * Each element is a string indicating the header name.
+     * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the forwardHeaders to add. + * @return This builder for chaining. + */ + public Builder addForwardHeadersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForwardHeadersIsMutable(); + forwardHeaders_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private int wireFormat_ = 0; + + /** + * + * + *
+     * Optional. The format of communication supported by the callout extension.
+     * If not specified, the default value `EXT_PROC_GRPC` is used.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for wireFormat. + */ + @java.lang.Override + public int getWireFormatValue() { + return wireFormat_; + } + + /** + * + * + *
+     * Optional. The format of communication supported by the callout extension.
+     * If not specified, the default value `EXT_PROC_GRPC` is used.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for wireFormat to set. + * @return This builder for chaining. + */ + public Builder setWireFormatValue(int value) { + wireFormat_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The format of communication supported by the callout extension.
+     * If not specified, the default value `EXT_PROC_GRPC` is used.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The wireFormat. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WireFormat getWireFormat() { + com.google.cloud.networkservices.v1.WireFormat result = + com.google.cloud.networkservices.v1.WireFormat.forNumber(wireFormat_); + return result == null ? com.google.cloud.networkservices.v1.WireFormat.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The format of communication supported by the callout extension.
+     * If not specified, the default value `EXT_PROC_GRPC` is used.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The wireFormat to set. + * @return This builder for chaining. + */ + public Builder setWireFormat(com.google.cloud.networkservices.v1.WireFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + wireFormat_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The format of communication supported by the callout extension.
+     * If not specified, the default value `EXT_PROC_GRPC` is used.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearWireFormat() { + bitField0_ = (bitField0_ & ~0x00001000); + wireFormat_ = 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.networkservices.v1.AuthzExtension) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AuthzExtension) + private static final com.google.cloud.networkservices.v1.AuthzExtension DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.AuthzExtension(); + } + + public static com.google.cloud.networkservices.v1.AuthzExtension getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AuthzExtension 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.networkservices.v1.AuthzExtension getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionName.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionName.java new file mode 100644 index 000000000000..94db0c752857 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionName.java @@ -0,0 +1,227 @@ +/* + * 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.networkservices.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 AuthzExtensionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AUTHZ_EXTENSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/authzExtensions/{authz_extension}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String authzExtension; + + @Deprecated + protected AuthzExtensionName() { + project = null; + location = null; + authzExtension = null; + } + + private AuthzExtensionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + authzExtension = Preconditions.checkNotNull(builder.getAuthzExtension()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAuthzExtension() { + return authzExtension; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AuthzExtensionName of(String project, String location, String authzExtension) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAuthzExtension(authzExtension) + .build(); + } + + public static String format(String project, String location, String authzExtension) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAuthzExtension(authzExtension) + .build() + .toString(); + } + + public static AuthzExtensionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AUTHZ_EXTENSION.validatedMatch( + formattedString, "AuthzExtensionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("authz_extension")); + } + + 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 (AuthzExtensionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AUTHZ_EXTENSION.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 (authzExtension != null) { + fieldMapBuilder.put("authz_extension", authzExtension); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AUTHZ_EXTENSION.instantiate( + "project", project, "location", location, "authz_extension", authzExtension); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AuthzExtensionName that = ((AuthzExtensionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.authzExtension, that.authzExtension); + } + 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(authzExtension); + return h; + } + + /** Builder for projects/{project}/locations/{location}/authzExtensions/{authz_extension}. */ + public static class Builder { + private String project; + private String location; + private String authzExtension; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAuthzExtension() { + return authzExtension; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAuthzExtension(String authzExtension) { + this.authzExtension = authzExtension; + return this; + } + + private Builder(AuthzExtensionName authzExtensionName) { + this.project = authzExtensionName.project; + this.location = authzExtensionName.location; + this.authzExtension = authzExtensionName.authzExtension; + } + + public AuthzExtensionName build() { + return new AuthzExtensionName(this); + } + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java new file mode 100644 index 000000000000..e4c2bfa823a6 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java @@ -0,0 +1,585 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface AuthzExtensionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AuthzExtension) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Identifier. Name of the `AuthzExtension` resource in the
+   * following format:
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. Identifier. Name of the `AuthzExtension` resource in the
+   * following format:
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Set of labels associated with the `AuthzExtension`
+   * resource.
+   *
+   * The format must comply with [the requirements for
+   * labels](/compute/docs/labeling-resources#requirements) for Google Cloud
+   * resources.
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Required. All backend services and forwarding rules referenced by this
+   * extension must share the same load balancing scheme. Supported values:
+   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+   * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for loadBalancingScheme. + */ + int getLoadBalancingSchemeValue(); + + /** + * + * + *
+   * Required. All backend services and forwarding rules referenced by this
+   * extension must share the same load balancing scheme. Supported values:
+   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
+   * 
+ * + * + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The loadBalancingScheme. + */ + com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingScheme(); + + /** + * + * + *
+   * Required. The `:authority` header in the gRPC request sent from Envoy
+   * to the extension service.
+   * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authority. + */ + java.lang.String getAuthority(); + + /** + * + * + *
+   * Required. The `:authority` header in the gRPC request sent from Envoy
+   * to the extension service.
+   * 
+ * + * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authority. + */ + com.google.protobuf.ByteString getAuthorityBytes(); + + /** + * + * + *
+   * Required. The reference to the service that runs the extension.
+   *
+   * To configure a callout extension, `service` must be a fully-qualified
+   * reference
+   * to a [backend
+   * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+   * in the format:
+   * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+   * or
+   * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+   * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The service. + */ + java.lang.String getService(); + + /** + * + * + *
+   * Required. The reference to the service that runs the extension.
+   *
+   * To configure a callout extension, `service` must be a fully-qualified
+   * reference
+   * to a [backend
+   * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices)
+   * in the format:
+   * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
+   * or
+   * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+   * 
+ * + * string service = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the timeout field is set. + */ + boolean hasTimeout(); + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeout. + */ + com.google.protobuf.Duration getTimeout(); + + /** + * + * + *
+   * Required. Specifies the timeout for each individual message on the stream.
+   * The timeout must be between 10-10000 milliseconds.
+   * 
+ * + * .google.protobuf.Duration timeout = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder(); + + /** + * + * + *
+   * Optional. Determines how the proxy behaves if the call to the extension
+   * fails or times out.
+   *
+   * When set to `TRUE`, request or response processing continues without
+   * error. Any subsequent extensions in the extension chain are also
+   * executed. When set to `FALSE` or the default setting of `FALSE` is used,
+   * one of the following happens:
+   *
+   * * If response headers have not been delivered to the downstream client,
+   * a generic 500 error is returned to the client. The error response can be
+   * tailored by configuring a custom error response in the load balancer.
+   *
+   * * If response headers have been delivered, then the HTTP stream to the
+   * downstream client is reset.
+   * 
+ * + * bool fail_open = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The failOpen. + */ + boolean getFailOpen(); + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The metadata. + */ + com.google.protobuf.Struct getMetadata(); + + /** + * + * + *
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension
+   * server. The metadata is available under the namespace
+   * `com.google.authz_extension.<resource_name>`.
+   * The following variables are supported in the metadata Struct:
+   *
+   * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+   *   qualified resource name.
+   * 
+ * + * .google.protobuf.Struct metadata = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the forwardHeaders. + */ + java.util.List getForwardHeadersList(); + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of forwardHeaders. + */ + int getForwardHeadersCount(); + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The forwardHeaders at the given index. + */ + java.lang.String getForwardHeaders(int index); + + /** + * + * + *
+   * Optional. List of the HTTP headers to forward to the extension
+   * (from the client). If omitted, all headers are sent.
+   * Each element is a string indicating the header name.
+   * 
+ * + * repeated string forward_headers = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the forwardHeaders at the given index. + */ + com.google.protobuf.ByteString getForwardHeadersBytes(int index); + + /** + * + * + *
+   * Optional. The format of communication supported by the callout extension.
+   * If not specified, the default value `EXT_PROC_GRPC` is used.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for wireFormat. + */ + int getWireFormatValue(); + + /** + * + * + *
+   * Optional. The format of communication supported by the callout extension.
+   * If not specified, the default value `EXT_PROC_GRPC` is used.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WireFormat wire_format = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The wireFormat. + */ + com.google.cloud.networkservices.v1.WireFormat getWireFormat(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequest.java new file mode 100644 index 000000000000..08291a58ff9f --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequest.java @@ -0,0 +1,1458 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for creating a `AuthzExtension` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateAuthzExtensionRequest} + */ +public final class CreateAuthzExtensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.CreateAuthzExtensionRequest) + CreateAuthzExtensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateAuthzExtensionRequest.newBuilder() to construct. + private CreateAuthzExtensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAuthzExtensionRequest() { + parent_ = ""; + authzExtensionId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAuthzExtensionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.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 of the `AuthzExtension` resource. Must
+   * be in the 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 of the `AuthzExtension` resource. Must
+   * be in the 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 AUTHZ_EXTENSION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object authzExtensionId_ = ""; + + /** + * + * + *
+   * Required. User-provided ID of the `AuthzExtension` resource to be
+   * created.
+   * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authzExtensionId. + */ + @java.lang.Override + public java.lang.String getAuthzExtensionId() { + java.lang.Object ref = authzExtensionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authzExtensionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. User-provided ID of the `AuthzExtension` resource to be
+   * created.
+   * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authzExtensionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthzExtensionIdBytes() { + java.lang.Object ref = authzExtensionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authzExtensionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHZ_EXTENSION_FIELD_NUMBER = 3; + private com.google.cloud.networkservices.v1.AuthzExtension authzExtension_; + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + @java.lang.Override + public boolean hasAuthzExtension() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension() { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionOrBuilder() { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authzExtensionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authzExtensionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAuthzExtension()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + 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(authzExtensionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authzExtensionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAuthzExtension()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + 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.networkservices.v1.CreateAuthzExtensionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest other = + (com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAuthzExtensionId().equals(other.getAuthzExtensionId())) return false; + if (hasAuthzExtension() != other.hasAuthzExtension()) return false; + if (hasAuthzExtension()) { + if (!getAuthzExtension().equals(other.getAuthzExtension())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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) + AUTHZ_EXTENSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getAuthzExtensionId().hashCode(); + if (hasAuthzExtension()) { + hash = (37 * hash) + AUTHZ_EXTENSION_FIELD_NUMBER; + hash = (53 * hash) + getAuthzExtension().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest 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.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + 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.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + java.io.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.networkservices.v1.CreateAuthzExtensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseDelimitedFrom( + java.io.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.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.CreateAuthzExtensionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for creating a `AuthzExtension` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateAuthzExtensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.CreateAuthzExtensionRequest) + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAuthzExtensionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + authzExtensionId_ = ""; + authzExtension_ = null; + if (authzExtensionBuilder_ != null) { + authzExtensionBuilder_.dispose(); + authzExtensionBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest build() { + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest buildPartial() { + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest result = + new com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authzExtensionId_ = authzExtensionId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.authzExtension_ = + authzExtensionBuilder_ == null ? authzExtension_ : authzExtensionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + 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.networkservices.v1.CreateAuthzExtensionRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest other) { + if (other + == com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAuthzExtensionId().isEmpty()) { + authzExtensionId_ = other.authzExtensionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAuthzExtension()) { + mergeAuthzExtension(other.getAuthzExtension()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + authzExtensionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAuthzExtensionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + 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 java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The parent resource of the `AuthzExtension` resource. Must
+     * be in the 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 of the `AuthzExtension` resource. Must
+     * be in the 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 of the `AuthzExtension` resource. Must
+     * be in the 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 of the `AuthzExtension` resource. Must
+     * be in the 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 of the `AuthzExtension` resource. Must
+     * be in the 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 authzExtensionId_ = ""; + + /** + * + * + *
+     * Required. User-provided ID of the `AuthzExtension` resource to be
+     * created.
+     * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authzExtensionId. + */ + public java.lang.String getAuthzExtensionId() { + java.lang.Object ref = authzExtensionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authzExtensionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `AuthzExtension` resource to be
+     * created.
+     * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authzExtensionId. + */ + public com.google.protobuf.ByteString getAuthzExtensionIdBytes() { + java.lang.Object ref = authzExtensionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authzExtensionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `AuthzExtension` resource to be
+     * created.
+     * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The authzExtensionId to set. + * @return This builder for chaining. + */ + public Builder setAuthzExtensionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + authzExtensionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `AuthzExtension` resource to be
+     * created.
+     * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAuthzExtensionId() { + authzExtensionId_ = getDefaultInstance().getAuthzExtensionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `AuthzExtension` resource to be
+     * created.
+     * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for authzExtensionId to set. + * @return This builder for chaining. + */ + public Builder setAuthzExtensionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + authzExtensionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.AuthzExtension authzExtension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + authzExtensionBuilder_; + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + public boolean hasAuthzExtension() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension() { + if (authzExtensionBuilder_ == null) { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } else { + return authzExtensionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthzExtension(com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authzExtension_ = value; + } else { + authzExtensionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthzExtension( + com.google.cloud.networkservices.v1.AuthzExtension.Builder builderForValue) { + if (authzExtensionBuilder_ == null) { + authzExtension_ = builderForValue.build(); + } else { + authzExtensionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthzExtension(com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && authzExtension_ != null + && authzExtension_ + != com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance()) { + getAuthzExtensionBuilder().mergeFrom(value); + } else { + authzExtension_ = value; + } + } else { + authzExtensionBuilder_.mergeFrom(value); + } + if (authzExtension_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthzExtension() { + bitField0_ = (bitField0_ & ~0x00000004); + authzExtension_ = null; + if (authzExtensionBuilder_ != null) { + authzExtensionBuilder_.dispose(); + authzExtensionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AuthzExtension.Builder getAuthzExtensionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAuthzExtensionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder + getAuthzExtensionOrBuilder() { + if (authzExtensionBuilder_ != null) { + return authzExtensionBuilder_.getMessageOrBuilder(); + } else { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + getAuthzExtensionFieldBuilder() { + if (authzExtensionBuilder_ == null) { + authzExtensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder>( + getAuthzExtension(), getParentForChildren(), isClean()); + authzExtension_ = null; + } + return authzExtensionBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.CreateAuthzExtensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.CreateAuthzExtensionRequest) + private static final com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest(); + } + + public static com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAuthzExtensionRequest 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.networkservices.v1.CreateAuthzExtensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequestOrBuilder.java new file mode 100644 index 000000000000..c07402e7be71 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAuthzExtensionRequestOrBuilder.java @@ -0,0 +1,181 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface CreateAuthzExtensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.CreateAuthzExtensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the `AuthzExtension` resource. Must
+   * be in the 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 of the `AuthzExtension` resource. Must
+   * be in the 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(); + + /** + * + * + *
+   * Required. User-provided ID of the `AuthzExtension` resource to be
+   * created.
+   * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The authzExtensionId. + */ + java.lang.String getAuthzExtensionId(); + + /** + * + * + *
+   * Required. User-provided ID of the `AuthzExtension` resource to be
+   * created.
+   * 
+ * + * string authz_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for authzExtensionId. + */ + com.google.protobuf.ByteString getAuthzExtensionIdBytes(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + boolean hasAuthzExtension(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequest.java index c8d55a409fda..3b632f2786f6 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequest.java @@ -253,12 +253,11 @@ public com.google.cloud.networkservices.v1.LbRouteExtension getLbRouteExtension( * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -291,12 +290,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1233,12 +1231,11 @@ public Builder clearLbRouteExtension() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1270,12 +1267,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1307,12 +1303,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1343,12 +1338,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1375,12 +1369,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequestOrBuilder.java index a0abdf58865d..87287aa12aad 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbRouteExtensionRequestOrBuilder.java @@ -134,12 +134,11 @@ public interface CreateLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -161,12 +160,11 @@ public interface CreateLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequest.java index 400b18b6304f..e35f9b115cd1 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequest.java @@ -254,12 +254,11 @@ public com.google.cloud.networkservices.v1.LbTrafficExtension getLbTrafficExtens * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -292,12 +291,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1239,12 +1237,11 @@ public Builder clearLbTrafficExtension() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1276,12 +1273,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1313,12 +1309,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1349,12 +1344,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1381,12 +1375,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequestOrBuilder.java index b3cb7de5d807..80ae93f46e88 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateLbTrafficExtensionRequestOrBuilder.java @@ -134,12 +134,11 @@ public interface CreateLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -161,12 +160,11 @@ public interface CreateLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequest.java new file mode 100644 index 000000000000..3c1cf9e2c076 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequest.java @@ -0,0 +1,1161 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `CreateWasmPlugin` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateWasmPluginRequest} + */ +public final class CreateWasmPluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.CreateWasmPluginRequest) + CreateWasmPluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateWasmPluginRequest.newBuilder() to construct. + private CreateWasmPluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateWasmPluginRequest() { + parent_ = ""; + wasmPluginId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateWasmPluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest.class, + com.google.cloud.networkservices.v1.CreateWasmPluginRequest.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 of the `WasmPlugin` resource. Must be in the
+   * format `projects/{project}/locations/global`.
+   * 
+ * + * + * 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 of the `WasmPlugin` resource. Must be in the
+   * format `projects/{project}/locations/global`.
+   * 
+ * + * + * 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 WASM_PLUGIN_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object wasmPluginId_ = ""; + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPlugin` resource to be created.
+   * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginId. + */ + @java.lang.Override + public java.lang.String getWasmPluginId() { + java.lang.Object ref = wasmPluginId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wasmPluginId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPlugin` resource to be created.
+   * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWasmPluginIdBytes() { + java.lang.Object ref = wasmPluginId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + wasmPluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WASM_PLUGIN_FIELD_NUMBER = 3; + private com.google.cloud.networkservices.v1.WasmPlugin wasmPlugin_; + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + @java.lang.Override + public boolean hasWasmPlugin() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin() { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder() { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(wasmPluginId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, wasmPluginId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getWasmPlugin()); + } + 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(wasmPluginId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, wasmPluginId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWasmPlugin()); + } + 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.networkservices.v1.CreateWasmPluginRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.CreateWasmPluginRequest other = + (com.google.cloud.networkservices.v1.CreateWasmPluginRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getWasmPluginId().equals(other.getWasmPluginId())) return false; + if (hasWasmPlugin() != other.hasWasmPlugin()) return false; + if (hasWasmPlugin()) { + if (!getWasmPlugin().equals(other.getWasmPlugin())) 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) + WASM_PLUGIN_ID_FIELD_NUMBER; + hash = (53 * hash) + getWasmPluginId().hashCode(); + if (hasWasmPlugin()) { + hash = (37 * hash) + WASM_PLUGIN_FIELD_NUMBER; + hash = (53 * hash) + getWasmPlugin().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest 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.networkservices.v1.CreateWasmPluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + 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.networkservices.v1.CreateWasmPluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + java.io.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.networkservices.v1.CreateWasmPluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseDelimitedFrom( + java.io.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.networkservices.v1.CreateWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.CreateWasmPluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `CreateWasmPlugin` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateWasmPluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.CreateWasmPluginRequest) + com.google.cloud.networkservices.v1.CreateWasmPluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateWasmPluginRequest.class, + com.google.cloud.networkservices.v1.CreateWasmPluginRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.CreateWasmPluginRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWasmPluginFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + wasmPluginId_ = ""; + wasmPlugin_ = null; + if (wasmPluginBuilder_ != null) { + wasmPluginBuilder_.dispose(); + wasmPluginBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.CreateWasmPluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginRequest build() { + com.google.cloud.networkservices.v1.CreateWasmPluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginRequest buildPartial() { + com.google.cloud.networkservices.v1.CreateWasmPluginRequest result = + new com.google.cloud.networkservices.v1.CreateWasmPluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.CreateWasmPluginRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wasmPluginId_ = wasmPluginId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.wasmPlugin_ = wasmPluginBuilder_ == null ? wasmPlugin_ : wasmPluginBuilder_.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.networkservices.v1.CreateWasmPluginRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.CreateWasmPluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.CreateWasmPluginRequest other) { + if (other == com.google.cloud.networkservices.v1.CreateWasmPluginRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWasmPluginId().isEmpty()) { + wasmPluginId_ = other.wasmPluginId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasWasmPlugin()) { + mergeWasmPlugin(other.getWasmPlugin()); + } + 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: + { + wasmPluginId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getWasmPluginFieldBuilder().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 of the `WasmPlugin` resource. Must be in the
+     * format `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 of the `WasmPlugin` resource. Must be in the
+     * format `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 of the `WasmPlugin` resource. Must be in the
+     * format `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 of the `WasmPlugin` resource. Must be in the
+     * format `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 of the `WasmPlugin` resource. Must be in the
+     * format `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 wasmPluginId_ = ""; + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPlugin` resource to be created.
+     * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginId. + */ + public java.lang.String getWasmPluginId() { + java.lang.Object ref = wasmPluginId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wasmPluginId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPlugin` resource to be created.
+     * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginId. + */ + public com.google.protobuf.ByteString getWasmPluginIdBytes() { + java.lang.Object ref = wasmPluginId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + wasmPluginId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPlugin` resource to be created.
+     * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The wasmPluginId to set. + * @return This builder for chaining. + */ + public Builder setWasmPluginId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + wasmPluginId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPlugin` resource to be created.
+     * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWasmPluginId() { + wasmPluginId_ = getDefaultInstance().getWasmPluginId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPlugin` resource to be created.
+     * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for wasmPluginId to set. + * @return This builder for chaining. + */ + public Builder setWasmPluginIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + wasmPluginId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.WasmPlugin wasmPlugin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + wasmPluginBuilder_; + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + public boolean hasWasmPlugin() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin() { + if (wasmPluginBuilder_ == null) { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } else { + return wasmPluginBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPlugin(com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wasmPlugin_ = value; + } else { + wasmPluginBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPlugin( + com.google.cloud.networkservices.v1.WasmPlugin.Builder builderForValue) { + if (wasmPluginBuilder_ == null) { + wasmPlugin_ = builderForValue.build(); + } else { + wasmPluginBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWasmPlugin(com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && wasmPlugin_ != null + && wasmPlugin_ != com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance()) { + getWasmPluginBuilder().mergeFrom(value); + } else { + wasmPlugin_ = value; + } + } else { + wasmPluginBuilder_.mergeFrom(value); + } + if (wasmPlugin_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWasmPlugin() { + bitField0_ = (bitField0_ & ~0x00000004); + wasmPlugin_ = null; + if (wasmPluginBuilder_ != null) { + wasmPluginBuilder_.dispose(); + wasmPluginBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.Builder getWasmPluginBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getWasmPluginFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder() { + if (wasmPluginBuilder_ != null) { + return wasmPluginBuilder_.getMessageOrBuilder(); + } else { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + } + + /** + * + * + *
+     * Required. `WasmPlugin` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + getWasmPluginFieldBuilder() { + if (wasmPluginBuilder_ == null) { + wasmPluginBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder>( + getWasmPlugin(), getParentForChildren(), isClean()); + wasmPlugin_ = null; + } + return wasmPluginBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.CreateWasmPluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.CreateWasmPluginRequest) + private static final com.google.cloud.networkservices.v1.CreateWasmPluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.CreateWasmPluginRequest(); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateWasmPluginRequest 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.networkservices.v1.CreateWasmPluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequestOrBuilder.java new file mode 100644 index 000000000000..d75503d514bd --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginRequestOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface CreateWasmPluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.CreateWasmPluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the `WasmPlugin` resource. Must be in the
+   * format `projects/{project}/locations/global`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource of the `WasmPlugin` resource. Must be in the
+   * format `projects/{project}/locations/global`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPlugin` resource to be created.
+   * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginId. + */ + java.lang.String getWasmPluginId(); + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPlugin` resource to be created.
+   * 
+ * + * string wasm_plugin_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginId. + */ + com.google.protobuf.ByteString getWasmPluginIdBytes(); + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + boolean hasWasmPlugin(); + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin(); + + /** + * + * + *
+   * Required. `WasmPlugin` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequest.java new file mode 100644 index 000000000000..f04c7d783e1f --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequest.java @@ -0,0 +1,1197 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `CreateWasmPluginVersion` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateWasmPluginVersionRequest} + */ +public final class CreateWasmPluginVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) + CreateWasmPluginVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateWasmPluginVersionRequest.newBuilder() to construct. + private CreateWasmPluginVersionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateWasmPluginVersionRequest() { + parent_ = ""; + wasmPluginVersionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateWasmPluginVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.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 of the `WasmPluginVersion` resource. Must be
+   * in the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_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 resource of the `WasmPluginVersion` resource. Must be
+   * in the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_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 WASM_PLUGIN_VERSION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object wasmPluginVersionId_ = ""; + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPluginVersion` resource to be
+   * created.
+   * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginVersionId. + */ + @java.lang.Override + public java.lang.String getWasmPluginVersionId() { + java.lang.Object ref = wasmPluginVersionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wasmPluginVersionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPluginVersion` resource to be
+   * created.
+   * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWasmPluginVersionIdBytes() { + java.lang.Object ref = wasmPluginVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + wasmPluginVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WASM_PLUGIN_VERSION_FIELD_NUMBER = 3; + private com.google.cloud.networkservices.v1.WasmPluginVersion wasmPluginVersion_; + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPluginVersion field is set. + */ + @java.lang.Override + public boolean hasWasmPluginVersion() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPluginVersion. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersion() { + return wasmPluginVersion_ == null + ? com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance() + : wasmPluginVersion_; + } + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder + getWasmPluginVersionOrBuilder() { + return wasmPluginVersion_ == null + ? com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance() + : wasmPluginVersion_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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(wasmPluginVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, wasmPluginVersionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getWasmPluginVersion()); + } + 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(wasmPluginVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, wasmPluginVersionId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWasmPluginVersion()); + } + 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.networkservices.v1.CreateWasmPluginVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest other = + (com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getWasmPluginVersionId().equals(other.getWasmPluginVersionId())) return false; + if (hasWasmPluginVersion() != other.hasWasmPluginVersion()) return false; + if (hasWasmPluginVersion()) { + if (!getWasmPluginVersion().equals(other.getWasmPluginVersion())) 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) + WASM_PLUGIN_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getWasmPluginVersionId().hashCode(); + if (hasWasmPluginVersion()) { + hash = (37 * hash) + WASM_PLUGIN_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getWasmPluginVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest 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.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + 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.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + java.io.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.networkservices.v1.CreateWasmPluginVersionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + parseDelimitedFrom( + java.io.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.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.CreateWasmPluginVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `CreateWasmPluginVersion` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.CreateWasmPluginVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWasmPluginVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + wasmPluginVersionId_ = ""; + wasmPluginVersion_ = null; + if (wasmPluginVersionBuilder_ != null) { + wasmPluginVersionBuilder_.dispose(); + wasmPluginVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest build() { + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest buildPartial() { + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest result = + new com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wasmPluginVersionId_ = wasmPluginVersionId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.wasmPluginVersion_ = + wasmPluginVersionBuilder_ == null + ? wasmPluginVersion_ + : wasmPluginVersionBuilder_.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.networkservices.v1.CreateWasmPluginVersionRequest) { + return mergeFrom( + (com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest other) { + if (other + == com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getWasmPluginVersionId().isEmpty()) { + wasmPluginVersionId_ = other.wasmPluginVersionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasWasmPluginVersion()) { + mergeWasmPluginVersion(other.getWasmPluginVersion()); + } + 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: + { + wasmPluginVersionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getWasmPluginVersionFieldBuilder().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 of the `WasmPluginVersion` resource. Must be
+     * in the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 resource of the `WasmPluginVersion` resource. Must be
+     * in the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 resource of the `WasmPluginVersion` resource. Must be
+     * in the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 resource of the `WasmPluginVersion` resource. Must be
+     * in the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 resource of the `WasmPluginVersion` resource. Must be
+     * in the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 wasmPluginVersionId_ = ""; + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPluginVersion` resource to be
+     * created.
+     * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginVersionId. + */ + public java.lang.String getWasmPluginVersionId() { + java.lang.Object ref = wasmPluginVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wasmPluginVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPluginVersion` resource to be
+     * created.
+     * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginVersionId. + */ + public com.google.protobuf.ByteString getWasmPluginVersionIdBytes() { + java.lang.Object ref = wasmPluginVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + wasmPluginVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPluginVersion` resource to be
+     * created.
+     * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The wasmPluginVersionId to set. + * @return This builder for chaining. + */ + public Builder setWasmPluginVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + wasmPluginVersionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPluginVersion` resource to be
+     * created.
+     * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearWasmPluginVersionId() { + wasmPluginVersionId_ = getDefaultInstance().getWasmPluginVersionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. User-provided ID of the `WasmPluginVersion` resource to be
+     * created.
+     * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for wasmPluginVersionId to set. + * @return This builder for chaining. + */ + public Builder setWasmPluginVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + wasmPluginVersionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.WasmPluginVersion wasmPluginVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder> + wasmPluginVersionBuilder_; + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPluginVersion field is set. + */ + public boolean hasWasmPluginVersion() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPluginVersion. + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersion() { + if (wasmPluginVersionBuilder_ == null) { + return wasmPluginVersion_ == null + ? com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance() + : wasmPluginVersion_; + } else { + return wasmPluginVersionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPluginVersion( + com.google.cloud.networkservices.v1.WasmPluginVersion value) { + if (wasmPluginVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wasmPluginVersion_ = value; + } else { + wasmPluginVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPluginVersion( + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder builderForValue) { + if (wasmPluginVersionBuilder_ == null) { + wasmPluginVersion_ = builderForValue.build(); + } else { + wasmPluginVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWasmPluginVersion( + com.google.cloud.networkservices.v1.WasmPluginVersion value) { + if (wasmPluginVersionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && wasmPluginVersion_ != null + && wasmPluginVersion_ + != com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance()) { + getWasmPluginVersionBuilder().mergeFrom(value); + } else { + wasmPluginVersion_ = value; + } + } else { + wasmPluginVersionBuilder_.mergeFrom(value); + } + if (wasmPluginVersion_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWasmPluginVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + wasmPluginVersion_ = null; + if (wasmPluginVersionBuilder_ != null) { + wasmPluginVersionBuilder_.dispose(); + wasmPluginVersionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion.Builder + getWasmPluginVersionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getWasmPluginVersionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder + getWasmPluginVersionOrBuilder() { + if (wasmPluginVersionBuilder_ != null) { + return wasmPluginVersionBuilder_.getMessageOrBuilder(); + } else { + return wasmPluginVersion_ == null + ? com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance() + : wasmPluginVersion_; + } + } + + /** + * + * + *
+     * Required. `WasmPluginVersion` resource to be created.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder> + getWasmPluginVersionFieldBuilder() { + if (wasmPluginVersionBuilder_ == null) { + wasmPluginVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder>( + getWasmPluginVersion(), getParentForChildren(), isClean()); + wasmPluginVersion_ = null; + } + return wasmPluginVersionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.CreateWasmPluginVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) + private static final com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest(); + } + + public static com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateWasmPluginVersionRequest 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.networkservices.v1.CreateWasmPluginVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequestOrBuilder.java new file mode 100644 index 000000000000..119fff636e3f --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateWasmPluginVersionRequestOrBuilder.java @@ -0,0 +1,131 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface CreateWasmPluginVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.CreateWasmPluginVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource of the `WasmPluginVersion` resource. Must be
+   * in the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The parent resource of the `WasmPluginVersion` resource. Must be
+   * in the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPluginVersion` resource to be
+   * created.
+   * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The wasmPluginVersionId. + */ + java.lang.String getWasmPluginVersionId(); + + /** + * + * + *
+   * Required. User-provided ID of the `WasmPluginVersion` resource to be
+   * created.
+   * 
+ * + * string wasm_plugin_version_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for wasmPluginVersionId. + */ + com.google.protobuf.ByteString getWasmPluginVersionIdBytes(); + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPluginVersion field is set. + */ + boolean hasWasmPluginVersion(); + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPluginVersion. + */ + com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersion(); + + /** + * + * + *
+   * Required. `WasmPluginVersion` resource to be created.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_version = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder getWasmPluginVersionOrBuilder(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequest.java new file mode 100644 index 000000000000..9b0f3b7a6935 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequest.java @@ -0,0 +1,950 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for deleting a `AuthzExtension` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteAuthzExtensionRequest} + */ +public final class DeleteAuthzExtensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) + DeleteAuthzExtensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteAuthzExtensionRequest.newBuilder() to construct. + private DeleteAuthzExtensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAuthzExtensionRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAuthzExtensionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `AuthzExtension` resource to delete. Must
+   * be in the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * 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 `AuthzExtension` resource to delete. Must
+   * be in the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * 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 REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + 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.networkservices.v1.DeleteAuthzExtensionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest other = + (com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest 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.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + 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.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + java.io.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.networkservices.v1.DeleteAuthzExtensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseDelimitedFrom( + java.io.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.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.DeleteAuthzExtensionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for deleting a `AuthzExtension` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteAuthzExtensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest build() { + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest buildPartial() { + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest result = + new com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.DeleteAuthzExtensionRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest other) { + if (other + == com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + requestId_ = 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 `AuthzExtension` resource to delete. Must
+     * be in the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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 `AuthzExtension` resource to delete. Must
+     * be in the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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 `AuthzExtension` resource to delete. Must
+     * be in the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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 `AuthzExtension` resource to delete. Must
+     * be in the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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 `AuthzExtension` resource to delete. Must
+     * be in the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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 requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.networkservices.v1.DeleteAuthzExtensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) + private static final com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest(); + } + + public static com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAuthzExtensionRequest 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.networkservices.v1.DeleteAuthzExtensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequestOrBuilder.java new file mode 100644 index 000000000000..7c13a94b77dd --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAuthzExtensionRequestOrBuilder.java @@ -0,0 +1,112 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface DeleteAuthzExtensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.DeleteAuthzExtensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `AuthzExtension` resource to delete. Must
+   * be in the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `AuthzExtension` resource to delete. Must
+   * be in the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequest.java index fd8017cccf56..59ef91f20055 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequest.java @@ -138,12 +138,11 @@ public com.google.protobuf.ByteString getNameBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -176,12 +175,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -721,12 +719,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -758,12 +755,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -795,12 +791,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -831,12 +826,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -863,12 +857,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequestOrBuilder.java index fe43943f1f74..305a57cbeedb 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbRouteExtensionRequestOrBuilder.java @@ -65,12 +65,11 @@ public interface DeleteLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -92,12 +91,11 @@ public interface DeleteLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequest.java index cd9e3180bf88..6d9b4837a750 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequest.java @@ -139,12 +139,11 @@ public com.google.protobuf.ByteString getNameBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -177,12 +176,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -724,12 +722,11 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -761,12 +758,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -798,12 +794,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -834,12 +829,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -866,12 +860,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequestOrBuilder.java index ae889fb64d08..60446b1ef450 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteLbTrafficExtensionRequestOrBuilder.java @@ -65,12 +65,11 @@ public interface DeleteLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -92,12 +91,11 @@ public interface DeleteLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. + * that for 60 minutes after the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequest.java new file mode 100644 index 000000000000..ae6f45e0ab58 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequest.java @@ -0,0 +1,656 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `DeleteWasmPlugin` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteWasmPluginRequest} + */ +public final class DeleteWasmPluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.DeleteWasmPluginRequest) + DeleteWasmPluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteWasmPluginRequest.newBuilder() to construct. + private DeleteWasmPluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteWasmPluginRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteWasmPluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.class, + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to delete. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to delete. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_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.networkservices.v1.DeleteWasmPluginRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest other = + (com.google.cloud.networkservices.v1.DeleteWasmPluginRequest) 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.networkservices.v1.DeleteWasmPluginRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest 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.networkservices.v1.DeleteWasmPluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseFrom( + 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.networkservices.v1.DeleteWasmPluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseFrom( + java.io.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.networkservices.v1.DeleteWasmPluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseDelimitedFrom( + java.io.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.networkservices.v1.DeleteWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.DeleteWasmPluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `DeleteWasmPlugin` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteWasmPluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.DeleteWasmPluginRequest) + com.google.cloud.networkservices.v1.DeleteWasmPluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.class, + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.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.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginRequest build() { + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginRequest buildPartial() { + com.google.cloud.networkservices.v1.DeleteWasmPluginRequest result = + new com.google.cloud.networkservices.v1.DeleteWasmPluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.DeleteWasmPluginRequest 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.networkservices.v1.DeleteWasmPluginRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.DeleteWasmPluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.DeleteWasmPluginRequest other) { + if (other == com.google.cloud.networkservices.v1.DeleteWasmPluginRequest.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. A name of the `WasmPlugin` resource to delete. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to delete. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to delete. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to delete. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to delete. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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.networkservices.v1.DeleteWasmPluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.DeleteWasmPluginRequest) + private static final com.google.cloud.networkservices.v1.DeleteWasmPluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.DeleteWasmPluginRequest(); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteWasmPluginRequest 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.networkservices.v1.DeleteWasmPluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequestOrBuilder.java new file mode 100644 index 000000000000..a2466788a485 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginRequestOrBuilder.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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface DeleteWasmPluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.DeleteWasmPluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to delete. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to delete. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_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-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequest.java new file mode 100644 index 000000000000..951a7447733d --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequest.java @@ -0,0 +1,675 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `DeleteWasmPluginVersion` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest} + */ +public final class DeleteWasmPluginVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) + DeleteWasmPluginVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DeleteWasmPluginVersionRequest.newBuilder() to construct. + private DeleteWasmPluginVersionRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteWasmPluginVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteWasmPluginVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to delete. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to delete. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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.networkservices.v1.DeleteWasmPluginVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest other = + (com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) 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.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest 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.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + 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.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + java.io.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.networkservices.v1.DeleteWasmPluginVersionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + parseDelimitedFrom( + java.io.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.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.DeleteWasmPluginVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `DeleteWasmPluginVersion` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest.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.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest build() { + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest buildPartial() { + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest result = + new com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest 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.networkservices.v1.DeleteWasmPluginVersionRequest) { + return mergeFrom( + (com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest other) { + if (other + == com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + .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. A name of the `WasmPluginVersion` resource to delete. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to delete. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to delete. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to delete. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to delete. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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.networkservices.v1.DeleteWasmPluginVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) + private static final com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest(); + } + + public static com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteWasmPluginVersionRequest 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.networkservices.v1.DeleteWasmPluginVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequestOrBuilder.java new file mode 100644 index 000000000000..54286fc45862 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteWasmPluginVersionRequestOrBuilder.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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface DeleteWasmPluginVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to delete. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to delete. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java index df7f84c438b2..fa05fa3da0ed 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java @@ -104,6 +104,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_networkservices_v1_DeleteLbRouteExtensionRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_networkservices_v1_DeleteLbRouteExtensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AuthzExtension_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -123,7 +155,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "unning/operations.proto\032\036google/protobuf" + "/duration.proto\032\033google/protobuf/empty.proto\032" + " google/protobuf/field_mask.proto\032\034" - + "google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\205\004\n" + + "google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\265\004\n" + "\016ExtensionChain\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022\\\n" + "\017match_condition\030\002" @@ -131,7 +163,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "extensions\030\003" + " \003(\01329.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\003\340A\002\032-\n" + "\016MatchCondition\022\033\n" - + "\016cel_expression\030\001 \001(\tB\003\340A\002\032\376\001\n" + + "\016cel_expression\030\001 \001(\tB\003\340A\002\032\256\002\n" + "\tExtension\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022\026\n" + "\tauthority\030\002 \001(\tB\003\340A\001\022\024\n" @@ -140,58 +172,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "loud.networkservices.v1.EventTypeB\003\340A\001\022/\n" + "\007timeout\030\005 \001(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n" + "\tfail_open\030\006 \001(\010B\003\340A\001\022\034\n" - + "\017forward_headers\030\007 \003(\tB\003\340A\001\"\345\005\n" + + "\017forward_headers\030\007 \003(\tB\003\340A\001\022.\n" + + "\010metadata\030\t \001(\0132\027.google.protobuf.StructB\003\340A\001\"\345\005\n" + "\022LbTrafficExtension\022\024\n" + "\004name\030\001 \001(\tB\006\340A\002\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\030\n" + "\013description\030\t \001(\tB\003\340A\001\022T\n" - + "\006labels\030\004 \003(\0132?.google.cloud.networks" - + "ervices.v1.LbTrafficExtension.LabelsEntryB\003\340A\001\022\035\n" - + "\020forwarding_rules\030\005 \003(\tB\003\340A\002\022N\n" - + "\020extension_chains\030\007" - + " \003(\0132/.google.cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" - + "\025load_balancing_scheme\030\010 \001(\01624.google.cl" - + "oud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + + "\006labels\030\004 \003(\0132?.google.cloud." + + "networkservices.v1.LbTrafficExtension.LabelsEntryB\003\340A\001\022\035\n" + + "\020forwarding_rules\030\005 \003(\tB\003\340A\001\022N\n" + + "\020extension_chains\030\007 \003(\0132/.google" + + ".cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" + + "\025load_balancing_scheme\030\010 \001(\01624.g" + + "oogle.cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + "\010metadata\030\n" + " \001(\0132\027.google.protobuf.StructB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\264\001\352A\260\001\n" - + "1networkservices.googleapis.com/LbTrafficExtension" - + "\022Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extens" - + "ion}*\023lbTrafficExtensions2\022lbTrafficExtension\"\310\001\n" + + "1networkservices.googleapis.com/LbTrafficExtension\022Rprojects/{project}/locations/{" + + "location}/lbTrafficExtensions/{lb_traffi" + + "c_extension}*\023lbTrafficExtensions2\022lbTrafficExtension\"\310\001\n" + "\036ListLbTrafficExtensionsRequest\022I\n" - + "\006parent\030\001 \001(" - + "\tB9\340A\002\372A3\0221networkservices.googleapis.com/LbTrafficExtension\022\026\n" + + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221networ" + + "kservices.googleapis.com/LbTrafficExtension\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + "\010order_by\030\005 \001(\tB\003\340A\001\"\243\001\n" + "\037ListLbTrafficExtensionsResponse\022R\n" - + "\025lb_traffic_extensions\030\001 \003(\01323.go" - + "ogle.cloud.networkservices.v1.LbTrafficExtension\022\027\n" + + "\025lb_traffic_extensions\030\001 " + + "\003(\01323.google.cloud.networkservices.v1.LbTrafficExtension\022\027\n" + "\017next_page_token\030\002 \001(\t\022\023\n" + "\013unreachable\030\003 \003(\t\"g\n" + "\034GetLbTrafficExtensionRequest\022G\n" + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + "1networkservices.googleapis.com/LbTrafficExtension\"\213\002\n" + "\037CreateLbTrafficExtensionRequest\022I\n" - + "\006parent\030\001 \001(" - + "\tB9\340A\002\372A3\0221networkservices.googleapis.com/LbTrafficExtension\022$\n" + + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221networkserv" + + "ices.googleapis.com/LbTrafficExtension\022$\n" + "\027lb_traffic_extension_id\030\002 \001(\tB\003\340A\002\022V\n" - + "\024lb_traffic_extension\030\003" - + " \001(\01323.google.cloud.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + + "\024lb_traffic_extension\030\003 \001(\01323.google.clou" + + "d.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\320\001\n" + "\037UpdateLbTrafficExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022V\n" - + "\024lb_traffic_extension\030\002 \001(\01323.google.c" - + "loud.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + + "\024lb_traffic_extension\030\002 \001(\01323." + + "google.cloud.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\213\001\n" + "\037DeleteLbTrafficExtensionRequest\022G\n" + "\004name\030\001 \001(\tB9\340A\002\372A3\n" - + "1networkservices.googleapis.com/LbTrafficExtension\022\037\n\n" + + "1networkservices.googleapis.com/LbTrafficExtension\022\037\n" + + "\n" + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\327\005\n" + "\020LbRouteExtension\022\024\n" + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0224\n" @@ -199,21 +233,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_time\030\003" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" + "\013description\030\t \001(\tB\003\340A\001\022R\n" - + "\006labels\030\004 \003(\0132=.google.cloud.networkse" - + "rvices.v1.LbRouteExtension.LabelsEntryB\003\340A\001\022\035\n" + + "\006labels\030\004 \003(\0132=.google.cloud.n" + + "etworkservices.v1.LbRouteExtension.LabelsEntryB\003\340A\001\022\035\n" + "\020forwarding_rules\030\005 \003(\tB\003\340A\002\022N\n" - + "\020extension_chains\030\007" - + " \003(\0132/.google.cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" - + "\025load_balancing_scheme\030\010 \001(\01624.google.cloud" - + ".networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + + "\020extension_chains\030\007 \003(\0132/.google.cl" + + "oud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" + + "\025load_balancing_scheme\030\010 \001(\01624.goog" + + "le.cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + "\010metadata\030\n" + " \001(\0132\027.google.protobuf.StructB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\252\001\352A\246\001\n" - + "/networkservices.googleapis.com/LbRouteExtension\022Npro" - + "jects/{project}/locations/{location}/lbR" - + "outeExtensions/{lb_route_extension}*\021lbRouteExtensions2\020lbRouteExtension\"\304\001\n" + + "/networkservices.googleapis.com/LbRouteExtens" + + "ion\022Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensi" + + "on}*\021lbRouteExtensions2\020lbRouteExtension\"\304\001\n" + "\034ListLbRouteExtensionsRequest\022G\n" + "\006parent\030\001 \001(" + "\tB7\340A\002\372A1\022/networkservices.googleapis.com/LbRouteExtension\022\026\n" @@ -230,20 +264,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + "/networkservices.googleapis.com/LbRouteExtension\"\201\002\n" + "\035CreateLbRouteExtensionRequest\022G\n" - + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/networks" - + "ervices.googleapis.com/LbRouteExtension\022\"\n" + + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/" + + "networkservices.googleapis.com/LbRouteExtension\022\"\n" + "\025lb_route_extension_id\030\002 \001(\tB\003\340A\002\022R\n" - + "\022lb_route_extension\030\003 \001(\01321.google.cloud.n" - + "etworkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + + "\022lb_route_extension\030\003 \001(\01321.google" + + ".cloud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\312\001\n" + "\035UpdateLbRouteExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022R\n" - + "\022lb_route_extension\030\002 \001(\01321.google.cl" - + "oud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + + "\022lb_route_extension\030\002 \001(\01321.g" + + "oogle.cloud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\207\001\n" + "\035DeleteLbRouteExtensionRequest\022E\n" + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + "/networkservices.googleapis.com/LbRouteExtension\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\265\006\n" + + "\016AuthzExtension\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\002\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\030\n" + + "\013description\030\004 \001(\tB\003\340A\001\022P\n" + + "\006labels\030\005 \003(\0132;.google.cloud.networkser" + + "vices.v1.AuthzExtension.LabelsEntryB\003\340A\001\022X\n" + + "\025load_balancing_scheme\030\006 \001(\01624.google" + + ".cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022\026\n" + + "\tauthority\030\007 \001(\tB\003\340A\002\022\024\n" + + "\007service\030\010 \001(\tB\003\340A\002\022/\n" + + "\007timeout\030\t \001(\0132\031.google.protobuf.DurationB\003\340A\002\022\026\n" + + "\tfail_open\030\n" + + " \001(\010B\003\340A\001\022.\n" + + "\010metadata\030\013 \001(\0132\027.google.protobuf.StructB\003\340A\001\022\034\n" + + "\017forward_headers\030\014 \003(\tB\003\340A\001\022E\n" + + "\013wire_format\030\016 \001(\0162+.google.cl" + + "oud.networkservices.v1.WireFormatB\003\340A\001\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\237\001\352A\233\001\n" + + "-networkservices.googleapis.com/AuthzExtension\022Iprojects/{project}/" + + "locations/{location}/authzExtensions/{au" + + "thz_extension}*\017authzExtensions2\016authzExtension\"\300\001\n" + + "\032ListAuthzExtensionsRequest\022E\n" + + "\006parent\030\001 \001(" + + "\tB5\340A\002\372A/\022-networkservices.googleapis.com/AuthzExtension\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + + "\010order_by\030\005 \001(\tB\003\340A\001\"\226\001\n" + + "\033ListAuthzExtensionsResponse\022I\n" + + "\020authz_extensions\030\001" + + " \003(\0132/.google.cloud.networkservices.v1.AuthzExtension\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"_\n" + + "\030GetAuthzExtensionRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-networkservices.googleapis.com/AuthzExtension\"\365\001\n" + + "\033CreateAuthzExtensionRequest\022E\n" + + "\006parent\030\001 \001(" + + "\tB5\340A\002\372A/\022-networkservices.googleapis.com/AuthzExtension\022\037\n" + + "\022authz_extension_id\030\002 \001(\tB\003\340A\002\022M\n" + + "\017authz_extension\030\003" + + " \001(\0132/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\303\001\n" + + "\033UpdateAuthzExtensionRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022M\n" + + "\017authz_extension\030\002" + + " \001(\0132/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\203\001\n" + + "\033DeleteAuthzExtensionRequest\022C\n" + + "\004name\030\001 \001(\tB5\340A\002\372A/\n" + + "-networkservices.googleapis.com/AuthzExtension\022\037\n\n" + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001*\244\001\n" + "\tEventType\022\032\n" + "\026EVENT_TYPE_UNSPECIFIED\020\000\022\023\n" @@ -256,63 +346,90 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023LoadBalancingScheme\022%\n" + "!LOAD_BALANCING_SCHEME_UNSPECIFIED\020\000\022\024\n" + "\020INTERNAL_MANAGED\020\001\022\024\n" - + "\020EXTERNAL_MANAGED\020\0022\356\024\n\n" + + "\020EXTERNAL_MANAGED\020\002*<\n\n" + + "WireFormat\022\033\n" + + "\027WIRE_FORMAT_UNSPECIFIED\020\000\022\021\n\r" + + "EXT_PROC_GRPC\020\0012\244\036\n\n" + "DepService\022\346\001\n" - + "\027ListLbTrafficExtensions\022?.google.cloud.networkservic" - + "es.v1.ListLbTrafficExtensionsRequest\032@.google.cloud.networkservices.v1.ListLbTra" - + "fficExtensionsResponse\"H\332A\006parent\202\323\344\223\0029\022" - + "7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\022\323\001\n" - + "\025GetLbTrafficExtension\022=.google.cloud.networkservices.v1.Get" - + "LbTrafficExtensionRequest\0323.google.cloud.networkservices.v1.LbTrafficExtension\"F" - + "\332A\004name\202\323\344\223\0029\0227/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\263\002\n" - + "\030CreateLbTrafficExtension\022@.google.cloud.netwo" - + "rkservices.v1.CreateLbTrafficExtensionRe" - + "quest\032\035.google.longrunning.Operation\"\265\001\312A\'\n" - + "\022LbTrafficExtension\022\021OperationMetadat" - + "a\332A3parent,lb_traffic_extension,lb_traff" - + "ic_extension_id\202\323\344\223\002O\"7/v1/{parent=proje" - + "cts/*/locations/*}/lbTrafficExtensions:\024lb_traffic_extension\022\265\002\n" - + "\030UpdateLbTrafficExtension\022@.google.cloud.networkservices" - + ".v1.UpdateLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"\267\001\312A\'\n" - + "\022LbTrafficExtension\022\021OperationMetadata\332A lb_tra" - + "ffic_extension,update_mask\202\323\344\223\002d2L/v1/{l" - + "b_traffic_extension.name=projects/*/loca" - + "tions/*/lbTrafficExtensions/*}:\024lb_traffic_extension\022\360\001\n" - + "\030DeleteLbTrafficExtension\022@.google.cloud.networkservices.v1.Dele" - + "teLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"s\312A*\n" - + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0029*7" - + "/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\336\001\n" - + "\025ListLbRouteExtensions\022=.google.cloud.networkservices.v1.List" - + "LbRouteExtensionsRequest\032>.google.cloud.networkservices.v1.ListLbRouteExtensions" - + "Response\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=p" - + "rojects/*/locations/*}/lbRouteExtensions\022\313\001\n" - + "\023GetLbRouteExtension\022;.google.cloud.networkservices.v1.GetLbRouteExtensionRe" - + "quest\0321.google.cloud.networkservices.v1." - + "LbRouteExtension\"D\332A\004name\202\323\344\223\0027\0225/v1/{na" - + "me=projects/*/locations/*/lbRouteExtensions/*}\022\245\002\n" - + "\026CreateLbRouteExtension\022>.google.cloud.networkservices.v1.CreateLbRout" - + "eExtensionRequest\032\035.google.longrunning.Operation\"\253\001\312A%\n" - + "\020LbRouteExtension\022\021OperationMetadata\332A/parent,lb_route_extension," - + "lb_route_extension_id\202\323\344\223\002K\"5/v1/{parent" - + "=projects/*/locations/*}/lbRouteExtensions:\022lb_route_extension\022\247\002\n" - + "\026UpdateLbRouteExtension\022>.google.cloud.networkservices" - + ".v1.UpdateLbRouteExtensionRequest\032\035.google.longrunning.Operation\"\255\001\312A%\n" - + "\020LbRouteExtension\022\021OperationMetadata\332A\036lb_route_e" - + "xtension,update_mask\202\323\344\223\002^2H/v1/{lb_rout" - + "e_extension.name=projects/*/locations/*/" - + "lbRouteExtensions/*}:\022lb_route_extension\022\352\001\n" - + "\026DeleteLbRouteExtension\022>.google.cloud.networkservices.v1.DeleteLbRouteExten" - + "sionRequest\032\035.google.longrunning.Operation\"q\312A*\n" - + "\025google.protobuf.Empty\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\0027*5/v1/{name=projec" - + "ts/*/locations/*/lbRouteExtensions/*}\032R\312" - + "A\036networkservices.googleapis.com\322A.https" - + "://www.googleapis.com/auth/cloud-platformB\351\001\n" - + "#com.google.cloud.networkservices.v1B\010DepProtoP\001ZMcloud.google.com/go/netwo" - + "rkservices/apiv1/networkservicespb;netwo" - + "rkservicespb\252\002\037Google.Cloud.NetworkServi" - + "ces.V1\312\002\037Google\\Cloud\\NetworkServices\\V1" - + "\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" + + "\027ListLbTrafficExtensions\022?.google.cloud.networkservice" + + "s.v1.ListLbTrafficExtensionsRequest\032@.google.cloud.networkservices.v1.ListLbTraf" + + "ficExtensionsResponse\"H\332A\006parent\202\323\344\223\0029\0227" + + "/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\022\323\001\n" + + "\025GetLbTrafficExtension\022=.google.cloud.networkservices.v1.GetL" + + "bTrafficExtensionRequest\0323.google.cloud." + + "networkservices.v1.LbTrafficExtension\"F\332" + + "A\004name\202\323\344\223\0029\0227/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\263\002\n" + + "\030CreateLbTrafficExtension\022@.google.cloud.networ" + + "kservices.v1.CreateLbTrafficExtensionReq" + + "uest\032\035.google.longrunning.Operation\"\265\001\312A\'\n" + + "\022LbTrafficExtension\022\021OperationMetadata" + + "\332A3parent,lb_traffic_extension,lb_traffi" + + "c_extension_id\202\323\344\223\002O\"7/v1/{parent=projec" + + "ts/*/locations/*}/lbTrafficExtensions:\024lb_traffic_extension\022\265\002\n" + + "\030UpdateLbTrafficExtension\022@.google.cloud.networkservices." + + "v1.UpdateLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"\267\001\312A\'\n" + + "\022LbTrafficExtension\022\021OperationMetadata\332A lb_traf" + + "fic_extension,update_mask\202\323\344\223\002d2L/v1/{lb" + + "_traffic_extension.name=projects/*/locat" + + "ions/*/lbTrafficExtensions/*}:\024lb_traffic_extension\022\360\001\n" + + "\030DeleteLbTrafficExtension\022@.google.cloud.networkservices.v1.Delet" + + "eLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"s\312A*\n" + + "\025google.protobuf." + + "Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0029*7/" + + "v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\336\001\n" + + "\025ListLbRouteExtensions\022=.google.cloud.networkservices.v1.ListL" + + "bRouteExtensionsRequest\032>.google.cloud.networkservices.v1.ListLbRouteExtensionsR" + + "esponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=pr" + + "ojects/*/locations/*}/lbRouteExtensions\022\313\001\n" + + "\023GetLbRouteExtension\022;.google.cloud.networkservices.v1.GetLbRouteExtensionReq" + + "uest\0321.google.cloud.networkservices.v1.L" + + "bRouteExtension\"D\332A\004name\202\323\344\223\0027\0225/v1/{nam" + + "e=projects/*/locations/*/lbRouteExtensions/*}\022\245\002\n" + + "\026CreateLbRouteExtension\022>.google.cloud.networkservices.v1.CreateLbRoute" + + "ExtensionRequest\032\035.google.longrunning.Operation\"\253\001\312A%\n" + + "\020LbRouteExtension\022\021OperationMetadata\332A/parent,lb_route_extension,l" + + "b_route_extension_id\202\323\344\223\002K\"5/v1/{parent=" + + "projects/*/locations/*}/lbRouteExtensions:\022lb_route_extension\022\247\002\n" + + "\026UpdateLbRouteExtension\022>.google.cloud.networkservices." + + "v1.UpdateLbRouteExtensionRequest\032\035.google.longrunning.Operation\"\255\001\312A%\n" + + "\020LbRouteExtension\022\021OperationMetadata\332A\036lb_route_ex" + + "tension,update_mask\202\323\344\223\002^2H/v1/{lb_route" + + "_extension.name=projects/*/locations/*/l" + + "bRouteExtensions/*}:\022lb_route_extension\022\352\001\n" + + "\026DeleteLbRouteExtension\022>.google.cloud.networkservices.v1.DeleteLbRouteExtens" + + "ionRequest\032\035.google.longrunning.Operation\"q\312A*\n" + + "\025google.protobuf.Empty\022\021Operation" + + "Metadata\332A\004name\202\323\344\223\0027*5/v1/{name=projects/*/locations/*/lbRouteExtensions/*}\022\326\001\n" + + "\023ListAuthzExtensions\022;.google.cloud.networkservices.v1.ListAuthzExtensionsReques" + + "t\032<.google.cloud.networkservices.v1.List" + + "AuthzExtensionsResponse\"D\332A\006parent\202\323\344\223\0025" + + "\0223/v1/{parent=projects/*/locations/*}/authzExtensions\022\303\001\n" + + "\021GetAuthzExtension\0229.google.cloud.networkservices.v1.GetAuthzEx" + + "tensionRequest\032/.google.cloud.networkser" + + "vices.v1.AuthzExtension\"B\332A\004name\202\323\344\223\0025\0223" + + "/v1/{name=projects/*/locations/*/authzExtensions/*}\022\224\002\n" + + "\024CreateAuthzExtension\022<.google.cloud.networkservices.v1.CreateAut" + + "hzExtensionRequest\032\035.google.longrunning.Operation\"\236\001\312A#\n" + + "\016AuthzExtension\022\021OperationMetadata\332A)parent,authz_extension,auth" + + "z_extension_id\202\323\344\223\002F\"3/v1/{parent=projec" + + "ts/*/locations/*}/authzExtensions:\017authz_extension\022\226\002\n" + + "\024UpdateAuthzExtension\022<.google.cloud.networkservices.v1.UpdateAuth" + + "zExtensionRequest\032\035.google.longrunning.Operation\"\240\001\312A#\n" + + "\016AuthzExtension\022\021OperationMetadata\332A\033authz_extension,update_mask\202" + + "\323\344\223\002V2C/v1/{authz_extension.name=project" + + "s/*/locations/*/authzExtensions/*}:\017authz_extension\022\344\001\n" + + "\024DeleteAuthzExtension\022<.google.cloud.networkservices.v1.DeleteAut" + + "hzExtensionRequest\032\035.google.longrunning.Operation\"o\312A*\n" + + "\025google.protobuf.Empty\022\021O" + + "perationMetadata\332A\004name\202\323\344\223\0025*3/v1/{name" + + "=projects/*/locations/*/authzExtensions/" + + "*}\032R\312A\036networkservices.googleapis.com\322A." + + "https://www.googleapis.com/auth/cloud-platformB\351\001\n" + + "#com.google.cloud.networkservices.v1B\010DepProtoP\001ZMcloud.google.com/go/" + + "networkservices/apiv1/networkservicespb;" + + "networkservicespb\252\002\037Google.Cloud.Network" + + "Services.V1\312\002\037Google\\Cloud\\NetworkServic" + + "es\\V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -364,6 +481,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Timeout", "FailOpen", "ForwardHeaders", + "Metadata", }); internal_static_google_cloud_networkservices_v1_LbTrafficExtension_descriptor = getDescriptor().getMessageTypes().get(1); @@ -513,6 +631,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", }); + internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_networkservices_v1_AuthzExtension_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Description", + "Labels", + "LoadBalancingScheme", + "Authority", + "Service", + "Timeout", + "FailOpen", + "Metadata", + "ForwardHeaders", + "WireFormat", + }); + internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_AuthzExtension_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor, + new java.lang.String[] { + "AuthzExtensions", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_CreateAuthzExtensionRequest_descriptor, + new java.lang.String[] { + "Parent", "AuthzExtensionId", "AuthzExtension", "RequestId", + }); + internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "AuthzExtension", "RequestId", + }); + internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_DeleteAuthzExtensionRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensibilityProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensibilityProto.java new file mode 100644 index 000000000000..e8df01aff4c9 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensibilityProto.java @@ -0,0 +1,485 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public final class ExtensibilityProto { + private ExtensibilityProto() {} + + 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_networkservices_v1_WasmPlugin_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_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" + + "3google/cloud/networkservices/v1/extensibility.proto\022\037google.cloud.networkservi" + + "ces.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\372\013\n\n" + + "WasmPlugin\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\030\n" + + "\013description\030\004 \001(\tB\003\340A\001\022L\n" + + "\006labels\030\005 \003(\01327." + + "google.cloud.networkservices.v1.WasmPlugin.LabelsEntryB\003\340A\001\022\034\n" + + "\017main_version_id\030\006 \001(\tB\003\340A\001\022N\n\n" + + "log_config\030\t \001(\01325.google.c" + + "loud.networkservices.v1.WasmPlugin.LogConfigB\003\340A\001\022P\n" + + "\010versions\030\n" + + " \003(\01329.google.clo" + + "ud.networkservices.v1.WasmPlugin.VersionsEntryB\003\340A\001\022H\n" + + "\007used_by\030\013 \003(\01322.google.cl" + + "oud.networkservices.v1.WasmPlugin.UsedByB\003\340A\003\032\313\003\n" + + "\016VersionDetails\022\034\n" + + "\022plugin_config_data\030\t \001(\014H\000\022\033\n" + + "\021plugin_config_uri\030\n" + + " \001(\tH\000\0224\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" + + "\013description\030\003 \001(\tB\003\340A\001\022[\n" + + "\006labels\030\004 \003(\0132F.goog" + + "le.cloud.networkservices.v1.WasmPlugin.VersionDetails.LabelsEntryB\003\340A\001\022\026\n" + + "\timage_uri\030\005 \001(\tB\003\340A\001\022\031\n" + + "\014image_digest\030\006 \001(\tB\003\340A\003\022!\n" + + "\024plugin_config_digest\030\013 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001B\026\n" + + "\024plugin_config_source\032\200\002\n" + + "\tLogConfig\022\023\n" + + "\006enable\030\001 \001(\010B\003\340A\001\022\030\n" + + "\013sample_rate\030\002 \001(\002B\003\340A\007\022Z\n\r" + + "min_log_level\030\003 \001(\0162>.google" + + ".cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevelB\003\340A\007\"h\n" + + "\010LogLevel\022\031\n" + + "\025LOG_LEVEL_UNSPECIFIED\020\000\022\t\n" + + "\005TRACE\020\001\022\t\n" + + "\005DEBUG\020\002\022\010\n" + + "\004INFO\020\003\022\010\n" + + "\004WARN\020\004\022\t\n" + + "\005ERROR\020\005\022\014\n" + + "\010CRITICAL\020\006\032\033\n" + + "\006UsedBy\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\032k\n\r" + + "VersionsEntry\022\013\n" + + "\003key\030\001 \001(\t\022I\n" + + "\005value\030\002" + + " \001(\0132:.google.cloud.networkservices.v1.WasmPlugin.VersionDetails:\0028\001:q\352An\n" + + ")networkservices.googleapis.com/WasmPlugin\022" + + "Aprojects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}\"\364\004\n" + + "\021WasmPluginVersion\022\034\n" + + "\022plugin_config_data\030\014 \001(\014H\000\022\033\n" + + "\021plugin_config_uri\030\r" + + " \001(\tH\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\022S\n" + + "\006labels\030\006 \003(\0132>.g" + + "oogle.cloud.networkservices.v1.WasmPluginVersion.LabelsEntryB\003\340A\001\022\026\n" + + "\timage_uri\030\010 \001(\tB\003\340A\001\022\031\n" + + "\014image_digest\030\t \001(\tB\003\340A\003\022!\n" + + "\024plugin_config_digest\030\016 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:\230\001\352A\224\001\n" + + "0networkservices.googleapis.com/WasmPluginVersion\022`projects/{project}/loca" + + "tions/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}B\026\n" + + "\024plugin_config_source\"\202\001\n" + + "\026ListWasmPluginsRequest\022A\n" + + "\006parent\030\001 \001(" + + "\tB1\340A\002\372A+\022)networkservices.googleapis.com/WasmPlugin\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"\212\001\n" + + "\027ListWasmPluginsResponse\022A\n" + + "\014wasm_plugins\030\001 \003(\013" + + "2+.google.cloud.networkservices.v1.WasmPlugin\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"\226\001\n" + + "\024GetWasmPluginRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")networkservices.googleapis.com/WasmPlugin\022=\n" + + "\004view\030\002 \001(\0162/.go" + + "ogle.cloud.networkservices.v1.WasmPluginView\"\300\001\n" + + "\027CreateWasmPluginRequest\022A\n" + + "\006parent\030\001 \001(" + + "\tB1\340A\002\372A+\022)networkservices.googleapis.com/WasmPlugin\022\033\n" + + "\016wasm_plugin_id\030\002 \001(\tB\003\340A\002\022E\n" + + "\013wasm_plugin\030\003 \001(\0132+.google.c" + + "loud.networkservices.v1.WasmPluginB\003\340A\002\"\226\001\n" + + "\027UpdateWasmPluginRequest\0224\n" + + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022E\n" + + "\013wasm_plugin\030\002" + + " \001(\0132+.google.cloud.networkservices.v1.WasmPluginB\003\340A\002\"Z\n" + + "\027DeleteWasmPluginRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")networkservices.googleapis.com/WasmPlugin\"\220\001\n" + + "\035ListWasmPluginVersionsRequest\022H\n" + + "\006parent\030\001 \001(" + + "\tB8\340A\002\372A2\0220networkservices.googleapis.com/WasmPluginVersion\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\"\240\001\n" + + "\036ListWasmPluginVersionsResponse\022P\n" + + "\024wasm_plugin_versions\030\001" + + " \003(\01322.google.cloud.networkservices.v1.WasmPluginVersion\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"e\n" + + "\033GetWasmPluginVersionRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0networkservices.googleapis.com/WasmPluginVersion\"\345\001\n" + + "\036CreateWasmPluginVersionRequest\022H\n" + + "\006parent\030\001 \001(\tB8\340A\002\372A2\0220ne" + + "tworkservices.googleapis.com/WasmPluginVersion\022#\n" + + "\026wasm_plugin_version_id\030\002 \001(\tB\003\340A\002\022T\n" + + "\023wasm_plugin_version\030\003 \001(\01322.googl" + + "e.cloud.networkservices.v1.WasmPluginVersionB\003\340A\002\"h\n" + + "\036DeleteWasmPluginVersionRequest\022F\n" + + "\004name\030\001 \001(\tB8\340A\002\372A2\n" + + "0networkservices.googleapis.com/WasmPluginVersion*i\n" + + "\016WasmPluginView\022 \n" + + "\034WASM_PLUGIN_VIEW_UNSPECIFIED\020\000\022\032\n" + + "\026WASM_PLUGIN_VIEW_BASIC\020\001\022\031\n" + + "\025WASM_PLUGIN_VIEW_FULL\020\002B\363\001\n" + + "#com.google.cloud.networkservices.v1B\022ExtensibilityPro" + + "toP\001ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservice" + + "spb\252\002\037Google.Cloud.NetworkServices.V1\312\002\037" + + "Google\\Cloud\\NetworkServices\\V1\352\002\"Google" + + "::Cloud::NetworkServices::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_networkservices_v1_WasmPlugin_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Description", + "Labels", + "MainVersionId", + "LogConfig", + "Versions", + "UsedBy", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor, + new java.lang.String[] { + "PluginConfigData", + "PluginConfigUri", + "CreateTime", + "UpdateTime", + "Description", + "Labels", + "ImageUri", + "ImageDigest", + "PluginConfigDigest", + "PluginConfigSource", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor, + new java.lang.String[] { + "Enable", "SampleRate", "MinLogLevel", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor, + new java.lang.String[] { + "PluginConfigData", + "PluginConfigUri", + "Name", + "CreateTime", + "UpdateTime", + "Description", + "Labels", + "ImageUri", + "ImageDigest", + "PluginConfigDigest", + "PluginConfigSource", + }); + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor, + new java.lang.String[] { + "WasmPlugins", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_CreateWasmPluginRequest_descriptor, + new java.lang.String[] { + "Parent", "WasmPluginId", "WasmPlugin", + }); + internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "WasmPlugin", + }); + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor, + new java.lang.String[] { + "WasmPluginVersions", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_CreateWasmPluginVersionRequest_descriptor, + new java.lang.String[] { + "Parent", "WasmPluginVersionId", "WasmPluginVersion", + }); + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_DeleteWasmPluginVersionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + 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.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java index 6dbf23854159..5decee1714dc 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java @@ -814,6 +814,9 @@ public interface ExtensionOrBuilder * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -829,6 +832,9 @@ public interface ExtensionOrBuilder * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -843,8 +849,6 @@ public interface ExtensionOrBuilder *
      * Required. The reference to the service that runs the extension.
      *
-     * Currently only callout extensions are supported here.
-     *
      * To configure a callout extension, `service` must be a fully-qualified
      * reference
      * to a [backend
@@ -853,6 +857,18 @@ public interface ExtensionOrBuilder
      * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
      * or
      * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     *
+     * To configure a plugin extension, `service` must be a reference
+     * to a [`WasmPlugin`
+     * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+     * in the format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+     * or
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+     *
+     * Plugin extensions are currently supported for the
+     * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+     * resources.
      * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -867,8 +883,6 @@ public interface ExtensionOrBuilder *
      * Required. The reference to the service that runs the extension.
      *
-     * Currently only callout extensions are supported here.
-     *
      * To configure a callout extension, `service` must be a fully-qualified
      * reference
      * to a [backend
@@ -877,6 +891,18 @@ public interface ExtensionOrBuilder
      * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
      * or
      * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     *
+     * To configure a plugin extension, `service` must be a reference
+     * to a [`WasmPlugin`
+     * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+     * in the format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+     * or
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+     *
+     * Plugin extensions are currently supported for the
+     * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+     * resources.
      * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -890,9 +916,15 @@ public interface ExtensionOrBuilder * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -908,9 +940,15 @@ public interface ExtensionOrBuilder * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -926,9 +964,15 @@ public interface ExtensionOrBuilder * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -945,9 +989,15 @@ public interface ExtensionOrBuilder * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -963,9 +1013,15 @@ public interface ExtensionOrBuilder * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -982,8 +1038,11 @@ public interface ExtensionOrBuilder * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -997,8 +1056,11 @@ public interface ExtensionOrBuilder * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1012,8 +1074,11 @@ public interface ExtensionOrBuilder * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1107,6 +1172,124 @@ public interface ExtensionOrBuilder * @return The bytes of the forwardHeaders at the given index. */ com.google.protobuf.ByteString getForwardHeadersBytes(int index); + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The metadata. + */ + com.google.protobuf.Struct getMetadata(); + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); } /** @@ -1234,6 +1417,9 @@ public com.google.protobuf.ByteString getNameBytes() { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1260,6 +1446,9 @@ public java.lang.String getAuthority() { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1290,8 +1479,6 @@ public com.google.protobuf.ByteString getAuthorityBytes() { *
      * Required. The reference to the service that runs the extension.
      *
-     * Currently only callout extensions are supported here.
-     *
      * To configure a callout extension, `service` must be a fully-qualified
      * reference
      * to a [backend
@@ -1300,6 +1487,18 @@ public com.google.protobuf.ByteString getAuthorityBytes() {
      * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
      * or
      * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     *
+     * To configure a plugin extension, `service` must be a reference
+     * to a [`WasmPlugin`
+     * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+     * in the format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+     * or
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+     *
+     * Plugin extensions are currently supported for the
+     * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+     * resources.
      * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1325,8 +1524,6 @@ public java.lang.String getService() { *
      * Required. The reference to the service that runs the extension.
      *
-     * Currently only callout extensions are supported here.
-     *
      * To configure a callout extension, `service` must be a fully-qualified
      * reference
      * to a [backend
@@ -1335,6 +1532,18 @@ public java.lang.String getService() {
      * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
      * or
      * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+     *
+     * To configure a plugin extension, `service` must be a reference
+     * to a [`WasmPlugin`
+     * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+     * in the format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+     * or
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+     *
+     * Plugin extensions are currently supported for the
+     * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+     * resources.
      * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1378,9 +1587,15 @@ public com.google.cloud.networkservices.v1.EventType convert(java.lang.Integer f * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -1401,9 +1616,15 @@ public java.util.List getSupporte * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -1422,9 +1643,15 @@ public int getSupportedEventsCount() { * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -1444,9 +1671,15 @@ public com.google.cloud.networkservices.v1.EventType getSupportedEvents(int inde * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -1465,9 +1698,15 @@ public java.util.List getSupportedEventsValueList() { * *
      * Optional. A set of events during request or response processing for which
-     * this extension is called. This field is required for the
-     * `LbTrafficExtension` resource. It must not be set for the
-     * `LbRouteExtension` resource.
+     * this extension is called.
+     *
+     * For the `LbTrafficExtension` resource, this field is required.
+     *
+     * For the `LbRouteExtension` resource, this field is optional. If
+     * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+     *
+     * For the `LbEdgeExtension` resource, this field is required and must only
+     * contain `REQUEST_HEADERS` event.
      * 
* * @@ -1492,8 +1731,11 @@ public int getSupportedEventsValue(int index) { * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1510,8 +1752,11 @@ public boolean hasTimeout() { * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1528,8 +1773,11 @@ public com.google.protobuf.Duration getTimeout() { * *
      * Optional. Specifies the timeout for each individual message on the
-     * stream. The timeout must be between 10-1000 milliseconds. Required for
-     * Callout extensions.
+     * stream. The timeout must be between `10`-`10000` milliseconds. Required
+     * for callout extensions.
+     *
+     * This field is not supported for plugin extensions. Setting it results in
+     * a validation error.
      * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1647,6 +1895,136 @@ public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { return forwardHeaders_.getByteString(index); } + public static final int METADATA_FIELD_NUMBER = 9; + private com.google.protobuf.Struct metadata_; + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.protobuf.Struct getMetadata() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + + /** + * + * + *
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata is available under the namespace
+     * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+     * For example:
+     * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+     *
+     * The following variables are supported in the metadata:
+     *
+     * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+     *   qualified resource name.
+     *
+     * This field must not be set for plugin extensions. Setting it results in
+     * a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
+     *
+     * This field is subject to following limitations:
+     *
+     * * The total size of the metadata must be less than 1KiB.
+     * * The total number of keys in the metadata must be less than 16.
+     * * The length of each key must be less than 64 characters.
+     * * The length of each value must be less than 1024 characters.
+     * * All values must be strings.
+     * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1687,6 +2065,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < forwardHeaders_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, forwardHeaders_.getRaw(i)); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getMetadata()); + } getUnknownFields().writeTo(output); } @@ -1732,6 +2113,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getForwardHeadersList().size(); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMetadata()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1758,6 +2142,10 @@ public boolean equals(final java.lang.Object obj) { } if (getFailOpen() != other.getFailOpen()) return false; if (!getForwardHeadersList().equals(other.getForwardHeadersList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1789,6 +2177,10 @@ public int hashCode() { hash = (37 * hash) + FORWARD_HEADERS_FIELD_NUMBER; hash = (53 * hash) + getForwardHeadersList().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1934,6 +2326,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getTimeoutFieldBuilder(); + getMetadataFieldBuilder(); } } @@ -1953,6 +2346,11 @@ public Builder clear() { } failOpen_ = false; forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } return this; } @@ -2022,6 +2420,10 @@ private void buildPartial0( forwardHeaders_.makeImmutable(); result.forwardHeaders_ = forwardHeaders_; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -2115,6 +2517,9 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.ExtensionChain.Exte } onChanged(); } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2197,6 +2602,12 @@ public Builder mergeFrom( forwardHeaders_.add(s); break; } // case 58 + case 74: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2361,6 +2772,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2386,6 +2800,9 @@ public java.lang.String getAuthority() { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2411,6 +2828,9 @@ public com.google.protobuf.ByteString getAuthorityBytes() { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2435,6 +2855,9 @@ public Builder setAuthority(java.lang.String value) { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2455,6 +2878,9 @@ public Builder clearAuthority() { * Optional. The `:authority` header in the gRPC request sent from Envoy * to the extension service. * Required for Callout extensions. + * + * This field is not supported for plugin extensions. Setting it results in + * a validation error. * * * string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2481,8 +2907,6 @@ public Builder setAuthorityBytes(com.google.protobuf.ByteString value) { *
        * Required. The reference to the service that runs the extension.
        *
-       * Currently only callout extensions are supported here.
-       *
        * To configure a callout extension, `service` must be a fully-qualified
        * reference
        * to a [backend
@@ -2491,6 +2915,18 @@ public Builder setAuthorityBytes(com.google.protobuf.ByteString value) {
        * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
        * or
        * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+       *
+       * To configure a plugin extension, `service` must be a reference
+       * to a [`WasmPlugin`
+       * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+       * in the format:
+       * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+       * or
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+       *
+       * Plugin extensions are currently supported for the
+       * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+       * resources.
        * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2515,8 +2951,6 @@ public java.lang.String getService() { *
        * Required. The reference to the service that runs the extension.
        *
-       * Currently only callout extensions are supported here.
-       *
        * To configure a callout extension, `service` must be a fully-qualified
        * reference
        * to a [backend
@@ -2525,6 +2959,18 @@ public java.lang.String getService() {
        * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
        * or
        * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+       *
+       * To configure a plugin extension, `service` must be a reference
+       * to a [`WasmPlugin`
+       * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+       * in the format:
+       * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+       * or
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+       *
+       * Plugin extensions are currently supported for the
+       * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+       * resources.
        * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2549,8 +2995,6 @@ public com.google.protobuf.ByteString getServiceBytes() { *
        * Required. The reference to the service that runs the extension.
        *
-       * Currently only callout extensions are supported here.
-       *
        * To configure a callout extension, `service` must be a fully-qualified
        * reference
        * to a [backend
@@ -2559,6 +3003,18 @@ public com.google.protobuf.ByteString getServiceBytes() {
        * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
        * or
        * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+       *
+       * To configure a plugin extension, `service` must be a reference
+       * to a [`WasmPlugin`
+       * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+       * in the format:
+       * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+       * or
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+       *
+       * Plugin extensions are currently supported for the
+       * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+       * resources.
        * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2582,8 +3038,6 @@ public Builder setService(java.lang.String value) { *
        * Required. The reference to the service that runs the extension.
        *
-       * Currently only callout extensions are supported here.
-       *
        * To configure a callout extension, `service` must be a fully-qualified
        * reference
        * to a [backend
@@ -2592,6 +3046,18 @@ public Builder setService(java.lang.String value) {
        * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
        * or
        * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+       *
+       * To configure a plugin extension, `service` must be a reference
+       * to a [`WasmPlugin`
+       * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+       * in the format:
+       * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+       * or
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+       *
+       * Plugin extensions are currently supported for the
+       * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+       * resources.
        * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2611,8 +3077,6 @@ public Builder clearService() { *
        * Required. The reference to the service that runs the extension.
        *
-       * Currently only callout extensions are supported here.
-       *
        * To configure a callout extension, `service` must be a fully-qualified
        * reference
        * to a [backend
@@ -2621,6 +3085,18 @@ public Builder clearService() {
        * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}`
        * or
        * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.
+       *
+       * To configure a plugin extension, `service` must be a reference
+       * to a [`WasmPlugin`
+       * resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins)
+       * in the format:
+       * `projects/{project}/locations/{location}/wasmPlugins/{plugin}`
+       * or
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`.
+       *
+       * Plugin extensions are currently supported for the
+       * `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension`
+       * resources.
        * 
* * string service = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -2654,9 +3130,15 @@ private void ensureSupportedEventsIsMutable() { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2677,9 +3159,15 @@ private void ensureSupportedEventsIsMutable() { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2697,9 +3185,15 @@ public int getSupportedEventsCount() { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2718,9 +3212,15 @@ public com.google.cloud.networkservices.v1.EventType getSupportedEvents(int inde * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2747,9 +3247,15 @@ public Builder setSupportedEvents( * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2774,9 +3280,15 @@ public Builder addSupportedEvents(com.google.cloud.networkservices.v1.EventType * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2801,9 +3313,15 @@ public Builder addAllSupportedEvents( * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2824,9 +3342,15 @@ public Builder clearSupportedEvents() { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2844,9 +3368,15 @@ public java.util.List getSupportedEventsValueList() { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2865,9 +3395,15 @@ public int getSupportedEventsValue(int index) { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2890,9 +3426,15 @@ public Builder setSupportedEventsValue(int index, int value) { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2914,9 +3456,15 @@ public Builder addSupportedEventsValue(int value) { * *
        * Optional. A set of events during request or response processing for which
-       * this extension is called. This field is required for the
-       * `LbTrafficExtension` resource. It must not be set for the
-       * `LbRouteExtension` resource.
+       * this extension is called.
+       *
+       * For the `LbTrafficExtension` resource, this field is required.
+       *
+       * For the `LbRouteExtension` resource, this field is optional. If
+       * unspecified, `REQUEST_HEADERS` event is assumed as supported.
+       *
+       * For the `LbEdgeExtension` resource, this field is required and must only
+       * contain `REQUEST_HEADERS` event.
        * 
* * @@ -2947,8 +3495,11 @@ public Builder addAllSupportedEventsValue(java.lang.Iterable * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2965,8 +3516,11 @@ public boolean hasTimeout() { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2987,8 +3541,11 @@ public com.google.protobuf.Duration getTimeout() { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3013,8 +3570,11 @@ public Builder setTimeout(com.google.protobuf.Duration value) { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3036,8 +3596,11 @@ public Builder setTimeout(com.google.protobuf.Duration.Builder builderForValue) * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3067,8 +3630,11 @@ public Builder mergeTimeout(com.google.protobuf.Duration value) { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3090,8 +3656,11 @@ public Builder clearTimeout() { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3108,8 +3677,11 @@ public com.google.protobuf.Duration.Builder getTimeoutBuilder() { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3128,8 +3700,11 @@ public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() { * *
        * Optional. Specifies the timeout for each individual message on the
-       * stream. The timeout must be between 10-1000 milliseconds. Required for
-       * Callout extensions.
+       * stream. The timeout must be between `10`-`10000` milliseconds. Required
+       * for callout extensions.
+       *
+       * This field is not supported for plugin extensions. Setting it results in
+       * a validation error.
        * 
* * .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -3448,6 +4023,448 @@ public Builder addForwardHeadersBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metadataBuilder_; + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + } else { + metadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMetadata(com.google.protobuf.Struct value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && metadata_ != null + && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000080); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getMetadataBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } + } + + /** + * + * + *
+       * Optional. The metadata provided here is included as part of the
+       * `metadata_context` (of type `google.protobuf.Struct`) in the
+       * `ProcessingRequest` message sent to the extension server.
+       *
+       * The metadata is available under the namespace
+       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
+       * For example:
+       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
+       *
+       * The following variables are supported in the metadata:
+       *
+       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
+       *   qualified resource name.
+       *
+       * This field must not be set for plugin extensions. Setting it results in
+       * a validation error.
+       *
+       * You can set metadata at either the resource level or the extension level.
+       * The extension level metadata is recommended because you can pass a
+       * different set of metadata through each extension to the backend.
+       *
+       * This field is subject to following limitations:
+       *
+       * * The total size of the metadata must be less than 1KiB.
+       * * The total number of keys in the metadata must be less than 16.
+       * * The length of each key must be less than 64 characters.
+       * * The length of each value must be less than 1024 characters.
+       * * All values must be strings.
+       * 
+ * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3652,7 +4669,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.MatchCondition getMatc * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -3673,7 +4691,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.MatchCondition getMatc * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -3695,7 +4714,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.MatchCondition getMatc * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -3715,7 +4735,8 @@ public int getExtensionsCount() { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -3735,7 +4756,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.Extension getExtension * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4591,7 +5613,8 @@ private void ensureExtensionsIsMutable() { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4615,7 +5638,8 @@ private void ensureExtensionsIsMutable() { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4638,7 +5662,8 @@ public int getExtensionsCount() { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4661,7 +5686,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.Extension getExtension * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4691,7 +5717,8 @@ public Builder setExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4719,7 +5746,8 @@ public Builder setExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4749,7 +5777,8 @@ public Builder addExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4779,7 +5808,8 @@ public Builder addExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4806,7 +5836,8 @@ public Builder addExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4834,7 +5865,8 @@ public Builder addExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4862,7 +5894,8 @@ public Builder addAllExtensions( * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4888,7 +5921,8 @@ public Builder clearExtensions() { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4914,7 +5948,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4934,7 +5969,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4958,7 +5994,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -4983,7 +6020,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -5005,7 +6043,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -5028,7 +6067,8 @@ public Builder removeExtensions(int index) { * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChainOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChainOrBuilder.java index 8590482584d2..aad69d436323 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChainOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChainOrBuilder.java @@ -112,7 +112,8 @@ public interface ExtensionChainOrBuilder * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -129,7 +130,8 @@ public interface ExtensionChainOrBuilder * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -146,7 +148,8 @@ public interface ExtensionChainOrBuilder * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -163,7 +166,8 @@ public interface ExtensionChainOrBuilder * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * @@ -181,7 +185,8 @@ public interface ExtensionChainOrBuilder * At least one extension is required. * Up to 3 extensions can be defined for each extension chain * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + * per extension chain. * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequest.java new file mode 100644 index 000000000000..572c6bfdce9b --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequest.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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for getting a `AuthzExtension` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetAuthzExtensionRequest} + */ +public final class GetAuthzExtensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.GetAuthzExtensionRequest) + GetAuthzExtensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetAuthzExtensionRequest.newBuilder() to construct. + private GetAuthzExtensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAuthzExtensionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAuthzExtensionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the `AuthzExtension` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * 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. A name of the `AuthzExtension` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * 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.networkservices.v1.GetAuthzExtensionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest other = + (com.google.cloud.networkservices.v1.GetAuthzExtensionRequest) 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.networkservices.v1.GetAuthzExtensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest 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.networkservices.v1.GetAuthzExtensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseFrom( + 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.networkservices.v1.GetAuthzExtensionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseFrom( + java.io.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.networkservices.v1.GetAuthzExtensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseDelimitedFrom( + java.io.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.networkservices.v1.GetAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.GetAuthzExtensionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for getting a `AuthzExtension` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetAuthzExtensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.GetAuthzExtensionRequest) + com.google.cloud.networkservices.v1.GetAuthzExtensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.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.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_GetAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAuthzExtensionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAuthzExtensionRequest build() { + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAuthzExtensionRequest buildPartial() { + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest result = + new com.google.cloud.networkservices.v1.GetAuthzExtensionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.GetAuthzExtensionRequest 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.networkservices.v1.GetAuthzExtensionRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.GetAuthzExtensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.GetAuthzExtensionRequest other) { + if (other + == com.google.cloud.networkservices.v1.GetAuthzExtensionRequest.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. A name of the `AuthzExtension` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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. A name of the `AuthzExtension` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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. A name of the `AuthzExtension` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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. A name of the `AuthzExtension` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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. A name of the `AuthzExtension` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+     * 
+ * + * + * 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.networkservices.v1.GetAuthzExtensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.GetAuthzExtensionRequest) + private static final com.google.cloud.networkservices.v1.GetAuthzExtensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.GetAuthzExtensionRequest(); + } + + public static com.google.cloud.networkservices.v1.GetAuthzExtensionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAuthzExtensionRequest 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.networkservices.v1.GetAuthzExtensionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequestOrBuilder.java new file mode 100644 index 000000000000..593638a10c99 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAuthzExtensionRequestOrBuilder.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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface GetAuthzExtensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.GetAuthzExtensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the `AuthzExtension` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the `AuthzExtension` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.
+   * 
+ * + * + * 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-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequest.java new file mode 100644 index 000000000000..061f5f6d22b4 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequest.java @@ -0,0 +1,826 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `GetWasmPlugin` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetWasmPluginRequest} + */ +public final class GetWasmPluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.GetWasmPluginRequest) + GetWasmPluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetWasmPluginRequest.newBuilder() to construct. + private GetWasmPluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetWasmPluginRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetWasmPluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetWasmPluginRequest.class, + com.google.cloud.networkservices.v1.GetWasmPluginRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to get. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to get. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_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; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_ = 0; + + /** + * + * + *
+   * Determines how much data must be returned in the response. See
+   * [AIP-157](https://google.aip.dev/157).
+   * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+   * Determines how much data must be returned in the response. See
+   * [AIP-157](https://google.aip.dev/157).
+   * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginView getView() { + com.google.cloud.networkservices.v1.WasmPluginView result = + com.google.cloud.networkservices.v1.WasmPluginView.forNumber(view_); + return result == null + ? com.google.cloud.networkservices.v1.WasmPluginView.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 (view_ + != com.google.cloud.networkservices.v1.WasmPluginView.WASM_PLUGIN_VIEW_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, view_); + } + 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 (view_ + != com.google.cloud.networkservices.v1.WasmPluginView.WASM_PLUGIN_VIEW_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_); + } + 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.networkservices.v1.GetWasmPluginRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.GetWasmPluginRequest other = + (com.google.cloud.networkservices.v1.GetWasmPluginRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (view_ != other.view_) 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) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest 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.networkservices.v1.GetWasmPluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + 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.networkservices.v1.GetWasmPluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + java.io.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.networkservices.v1.GetWasmPluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseDelimitedFrom( + java.io.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.networkservices.v1.GetWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.GetWasmPluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `GetWasmPlugin` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetWasmPluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.GetWasmPluginRequest) + com.google.cloud.networkservices.v1.GetWasmPluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetWasmPluginRequest.class, + com.google.cloud.networkservices.v1.GetWasmPluginRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.GetWasmPluginRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + view_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.GetWasmPluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginRequest build() { + com.google.cloud.networkservices.v1.GetWasmPluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginRequest buildPartial() { + com.google.cloud.networkservices.v1.GetWasmPluginRequest result = + new com.google.cloud.networkservices.v1.GetWasmPluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.GetWasmPluginRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.view_ = view_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.GetWasmPluginRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.GetWasmPluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.GetWasmPluginRequest other) { + if (other == com.google.cloud.networkservices.v1.GetWasmPluginRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + 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 16: + { + view_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. A name of the `WasmPlugin` resource to get. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to get. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to get. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to get. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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. A name of the `WasmPlugin` resource to get. Must be in the
+     * format `projects/{project}/locations/global/wasmPlugins/{wasm_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; + } + + private int view_ = 0; + + /** + * + * + *
+     * Determines how much data must be returned in the response. See
+     * [AIP-157](https://google.aip.dev/157).
+     * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + + /** + * + * + *
+     * Determines how much data must be returned in the response. See
+     * [AIP-157](https://google.aip.dev/157).
+     * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + view_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Determines how much data must be returned in the response. See
+     * [AIP-157](https://google.aip.dev/157).
+     * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginView getView() { + com.google.cloud.networkservices.v1.WasmPluginView result = + com.google.cloud.networkservices.v1.WasmPluginView.forNumber(view_); + return result == null + ? com.google.cloud.networkservices.v1.WasmPluginView.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Determines how much data must be returned in the response. See
+     * [AIP-157](https://google.aip.dev/157).
+     * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.networkservices.v1.WasmPluginView value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + view_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Determines how much data must be returned in the response. See
+     * [AIP-157](https://google.aip.dev/157).
+     * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return This builder for chaining. + */ + public Builder clearView() { + bitField0_ = (bitField0_ & ~0x00000002); + view_ = 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.networkservices.v1.GetWasmPluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.GetWasmPluginRequest) + private static final com.google.cloud.networkservices.v1.GetWasmPluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.GetWasmPluginRequest(); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetWasmPluginRequest 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.networkservices.v1.GetWasmPluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequestOrBuilder.java new file mode 100644 index 000000000000..7cf929afeb04 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginRequestOrBuilder.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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface GetWasmPluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.GetWasmPluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to get. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the `WasmPlugin` resource to get. Must be in the
+   * format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Determines how much data must be returned in the response. See
+   * [AIP-157](https://google.aip.dev/157).
+   * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + + /** + * + * + *
+   * Determines how much data must be returned in the response. See
+   * [AIP-157](https://google.aip.dev/157).
+   * 
+ * + * .google.cloud.networkservices.v1.WasmPluginView view = 2; + * + * @return The view. + */ + com.google.cloud.networkservices.v1.WasmPluginView getView(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequest.java new file mode 100644 index 000000000000..90fcda031e63 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequest.java @@ -0,0 +1,670 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `GetWasmPluginVersion` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetWasmPluginVersionRequest} + */ +public final class GetWasmPluginVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.GetWasmPluginVersionRequest) + GetWasmPluginVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetWasmPluginVersionRequest.newBuilder() to construct. + private GetWasmPluginVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetWasmPluginVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetWasmPluginVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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.networkservices.v1.GetWasmPluginVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest other = + (com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest) 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.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest 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.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + 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.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + java.io.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.networkservices.v1.GetWasmPluginVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseDelimitedFrom( + java.io.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.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.GetWasmPluginVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `GetWasmPluginVersion` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.GetWasmPluginVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.GetWasmPluginVersionRequest) + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.class, + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.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.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_GetWasmPluginVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest build() { + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest buildPartial() { + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest result = + new com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest 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.networkservices.v1.GetWasmPluginVersionRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest other) { + if (other + == com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest.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. A name of the `WasmPluginVersion` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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. A name of the `WasmPluginVersion` resource to get. Must be in
+     * the format
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+     * 
+ * + * + * 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.networkservices.v1.GetWasmPluginVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.GetWasmPluginVersionRequest) + private static final com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest(); + } + + public static com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetWasmPluginVersionRequest 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.networkservices.v1.GetWasmPluginVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequestOrBuilder.java new file mode 100644 index 000000000000..536cd94248fe --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetWasmPluginVersionRequestOrBuilder.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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface GetWasmPluginVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.GetWasmPluginVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. A name of the `WasmPluginVersion` resource to get. Must be in
+   * the format
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
+   * 
+ * + * + * 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-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtension.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtension.java index 91b68b0b887e..182f0e3755a2 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtension.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtension.java @@ -434,8 +434,9 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -451,8 +452,9 @@ public com.google.protobuf.ProtocolStringList getForwardingRulesList() { * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -468,8 +470,9 @@ public int getForwardingRulesCount() { * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -486,8 +489,9 @@ public java.lang.String getForwardingRules(int index) { * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -622,8 +626,8 @@ public com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionC * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -644,8 +648,8 @@ public int getLoadBalancingSchemeValue() { * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -672,13 +676,25 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -696,13 +712,25 @@ public boolean hasMetadata() { *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -720,13 +748,25 @@ public com.google.protobuf.Struct getMetadata() { *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -2290,8 +2330,9 @@ private void ensureForwardingRulesIsMutable() { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2308,8 +2349,9 @@ public com.google.protobuf.ProtocolStringList getForwardingRulesList() { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2325,8 +2367,9 @@ public int getForwardingRulesCount() { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2343,8 +2386,9 @@ public java.lang.String getForwardingRules(int index) { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2361,8 +2405,9 @@ public com.google.protobuf.ByteString getForwardingRulesBytes(int index) { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2387,8 +2432,9 @@ public Builder setForwardingRules(int index, java.lang.String value) { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2412,8 +2458,9 @@ public Builder addForwardingRules(java.lang.String value) { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2434,8 +2481,9 @@ public Builder addAllForwardingRules(java.lang.Iterable values * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2455,8 +2503,9 @@ public Builder clearForwardingRules() { * *
      * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LbRouteExtension` resource per forwarding rule.
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbRouteExtension` resource can be associated with a forwarding
+     * rule.
      * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -2990,8 +3039,8 @@ public com.google.cloud.networkservices.v1.ExtensionChain.Builder addExtensionCh * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -3012,8 +3061,8 @@ public int getLoadBalancingSchemeValue() { * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -3037,8 +3086,8 @@ public Builder setLoadBalancingSchemeValue(int value) { * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -3063,8 +3112,8 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -3092,8 +3141,8 @@ public Builder setLoadBalancingScheme( * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -3122,13 +3171,25 @@ public Builder clearLoadBalancingScheme() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3145,13 +3206,25 @@ public boolean hasMetadata() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3172,13 +3245,25 @@ public com.google.protobuf.Struct getMetadata() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3203,13 +3288,25 @@ public Builder setMetadata(com.google.protobuf.Struct value) { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3231,13 +3328,25 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3267,13 +3376,25 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3295,13 +3416,25 @@ public Builder clearMetadata() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3318,13 +3451,25 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3343,13 +3488,25 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { *
      * Optional. The metadata provided here is included as part of the
      * `metadata_context` (of type `google.protobuf.Struct`) in the
-     * `ProcessingRequest` message sent to the extension
-     * server. The metadata is available under the namespace
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_route_extension.<resource_name>`.
-     * The following variables are supported in the metadata Struct:
+     *
+     * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtensionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtensionOrBuilder.java index 55cbca86394e..be5dbed285f4 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtensionOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbRouteExtensionOrBuilder.java @@ -252,8 +252,9 @@ java.lang.String getLabelsOrDefault( * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -267,8 +268,9 @@ java.lang.String getLabelsOrDefault( * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -282,8 +284,9 @@ java.lang.String getLabelsOrDefault( * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -298,8 +301,9 @@ java.lang.String getLabelsOrDefault( * *
    * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LbRouteExtension` resource per forwarding rule.
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbRouteExtension` resource can be associated with a forwarding
+   * rule.
    * 
* * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; @@ -408,8 +412,8 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -427,8 +431,8 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr * Required. All backend services and forwarding rules referenced by this * extension must share the same load balancing scheme. Supported values: * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * [Backend services + * overview](https://cloud.google.com/load-balancing/docs/backend-service). * * * @@ -445,13 +449,25 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -466,13 +482,25 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -487,13 +515,25 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr *
    * Optional. The metadata provided here is included as part of the
    * `metadata_context` (of type `google.protobuf.Struct`) in the
-   * `ProcessingRequest` message sent to the extension
-   * server. The metadata is available under the namespace
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_route_extension.<resource_name>`.
-   * The following variables are supported in the metadata Struct:
+   *
+   * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtension.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtension.java index 81606da7389a..32db25aba129 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtension.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtension.java @@ -435,12 +435,13 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the forwardingRules. */ @@ -452,12 +453,13 @@ public com.google.protobuf.ProtocolStringList getForwardingRulesList() { * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of forwardingRules. */ @@ -469,12 +471,13 @@ public int getForwardingRulesCount() { * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The forwardingRules at the given index. @@ -487,12 +490,13 @@ public java.lang.String getForwardingRules(int index) { * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the forwardingRules at the given index. @@ -623,9 +627,9 @@ public com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionC *
    * Required. All backend services and forwarding rules referenced by this
    * extension must share the same load balancing scheme. Supported values:
-   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-   * [Choosing a load
-   * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+   * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
    * 
* * @@ -645,9 +649,9 @@ public int getLoadBalancingSchemeValue() { *
    * Required. All backend services and forwarding rules referenced by this
    * extension must share the same load balancing scheme. Supported values:
-   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-   * [Choosing a load
-   * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+   * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
    * 
* * @@ -672,14 +676,27 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -695,14 +712,27 @@ public boolean hasMetadata() { * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -718,14 +748,27 @@ public com.google.protobuf.Struct getMetadata() { * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -2291,12 +2334,13 @@ private void ensureForwardingRulesIsMutable() { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the forwardingRules. */ @@ -2309,12 +2353,13 @@ public com.google.protobuf.ProtocolStringList getForwardingRulesList() { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of forwardingRules. */ @@ -2326,12 +2371,13 @@ public int getForwardingRulesCount() { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The forwardingRules at the given index. @@ -2344,12 +2390,13 @@ public java.lang.String getForwardingRules(int index) { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the forwardingRules at the given index. @@ -2362,12 +2409,13 @@ public com.google.protobuf.ByteString getForwardingRulesBytes(int index) { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The forwardingRules to set. @@ -2388,12 +2436,13 @@ public Builder setForwardingRules(int index, java.lang.String value) { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The forwardingRules to add. * @return This builder for chaining. @@ -2413,12 +2462,13 @@ public Builder addForwardingRules(java.lang.String value) { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The forwardingRules to add. * @return This builder for chaining. @@ -2435,12 +2485,13 @@ public Builder addAllForwardingRules(java.lang.Iterable values * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2456,12 +2507,13 @@ public Builder clearForwardingRules() { * * *
-     * Required. A list of references to the forwarding rules to which this
-     * service extension is attached to. At least one forwarding rule is required.
-     * There can be only one `LBTrafficExtension` resource per forwarding rule.
+     * Optional. A list of references to the forwarding rules to which this
+     * service extension is attached. At least one forwarding rule is required.
+     * Only one `LbTrafficExtension` resource can be associated with a forwarding
+     * rule.
      * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the forwardingRules to add. * @return This builder for chaining. @@ -2991,9 +3043,9 @@ public com.google.cloud.networkservices.v1.ExtensionChain.Builder addExtensionCh *
      * Required. All backend services and forwarding rules referenced by this
      * extension must share the same load balancing scheme. Supported values:
-     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-     * [Choosing a load
-     * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+     * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
      * 
* * @@ -3013,9 +3065,9 @@ public int getLoadBalancingSchemeValue() { *
      * Required. All backend services and forwarding rules referenced by this
      * extension must share the same load balancing scheme. Supported values:
-     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-     * [Choosing a load
-     * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+     * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
      * 
* * @@ -3038,9 +3090,9 @@ public Builder setLoadBalancingSchemeValue(int value) { *
      * Required. All backend services and forwarding rules referenced by this
      * extension must share the same load balancing scheme. Supported values:
-     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-     * [Choosing a load
-     * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+     * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
      * 
* * @@ -3064,9 +3116,9 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS *
      * Required. All backend services and forwarding rules referenced by this
      * extension must share the same load balancing scheme. Supported values:
-     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-     * [Choosing a load
-     * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+     * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
      * 
* * @@ -3093,9 +3145,9 @@ public Builder setLoadBalancingScheme( *
      * Required. All backend services and forwarding rules referenced by this
      * extension must share the same load balancing scheme. Supported values:
-     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-     * [Choosing a load
-     * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+     * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+     * [Backend services
+     * overview](https://cloud.google.com/load-balancing/docs/backend-service).
      * 
* * @@ -3122,14 +3174,27 @@ public Builder clearLoadBalancingScheme() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3144,14 +3209,27 @@ public boolean hasMetadata() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3170,14 +3248,27 @@ public com.google.protobuf.Struct getMetadata() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3200,14 +3291,27 @@ public Builder setMetadata(com.google.protobuf.Struct value) { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3227,14 +3331,27 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3262,14 +3379,27 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3289,14 +3419,27 @@ public Builder clearMetadata() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3311,14 +3454,27 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -3335,14 +3491,27 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { * * *
-     * Optional. The metadata provided here is included in the
-     * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-     * metadata is available under the key
+     * Optional. The metadata provided here is included as part of the
+     * `metadata_context` (of type `google.protobuf.Struct`) in the
+     * `ProcessingRequest` message sent to the extension server.
+     *
+     * The metadata applies to all extensions in all extensions chains in this
+     * resource.
+     *
+     * The metadata is available under the key
      * `com.google.lb_traffic_extension.<resource_name>`.
+     *
      * The following variables are supported in the metadata:
      *
      * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
      *   qualified resource name.
+     *
+     * This field must not be set if at least one of the extension chains
+     * contains plugin extensions. Setting it results in a validation error.
+     *
+     * You can set metadata at either the resource level or the extension level.
+     * The extension level metadata is recommended because you can pass a
+     * different set of metadata through each extension to the backend.
      * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtensionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtensionOrBuilder.java index edd43c84b18e..3241a2931075 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtensionOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LbTrafficExtensionOrBuilder.java @@ -251,12 +251,13 @@ java.lang.String getLabelsOrDefault( * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the forwardingRules. */ @@ -266,12 +267,13 @@ java.lang.String getLabelsOrDefault( * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of forwardingRules. */ @@ -281,12 +283,13 @@ java.lang.String getLabelsOrDefault( * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The forwardingRules at the given index. @@ -297,12 +300,13 @@ java.lang.String getLabelsOrDefault( * * *
-   * Required. A list of references to the forwarding rules to which this
-   * service extension is attached to. At least one forwarding rule is required.
-   * There can be only one `LBTrafficExtension` resource per forwarding rule.
+   * Optional. A list of references to the forwarding rules to which this
+   * service extension is attached. At least one forwarding rule is required.
+   * Only one `LbTrafficExtension` resource can be associated with a forwarding
+   * rule.
    * 
* - * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * repeated string forwarding_rules = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the forwardingRules at the given index. @@ -407,9 +411,9 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr *
    * Required. All backend services and forwarding rules referenced by this
    * extension must share the same load balancing scheme. Supported values:
-   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-   * [Choosing a load
-   * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+   * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
    * 
* * @@ -426,9 +430,9 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr *
    * Required. All backend services and forwarding rules referenced by this
    * extension must share the same load balancing scheme. Supported values:
-   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
-   * [Choosing a load
-   * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+   * `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to
+   * [Backend services
+   * overview](https://cloud.google.com/load-balancing/docs/backend-service).
    * 
* * @@ -443,14 +447,27 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -463,14 +480,27 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; @@ -483,14 +513,27 @@ com.google.cloud.networkservices.v1.ExtensionChainOrBuilder getExtensionChainsOr * * *
-   * Optional. The metadata provided here is included in the
-   * `ProcessingRequest.metadata_context.filter_metadata` map field. The
-   * metadata is available under the key
+   * Optional. The metadata provided here is included as part of the
+   * `metadata_context` (of type `google.protobuf.Struct`) in the
+   * `ProcessingRequest` message sent to the extension server.
+   *
+   * The metadata applies to all extensions in all extensions chains in this
+   * resource.
+   *
+   * The metadata is available under the key
    * `com.google.lb_traffic_extension.<resource_name>`.
+   *
    * The following variables are supported in the metadata:
    *
    * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
    *   qualified resource name.
+   *
+   * This field must not be set if at least one of the extension chains
+   * contains plugin extensions. Setting it results in a validation error.
+   *
+   * You can set metadata at either the resource level or the extension level.
+   * The extension level metadata is recommended because you can pass a
+   * different set of metadata through each extension to the backend.
    * 
* * .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequest.java new file mode 100644 index 000000000000..d5308417b5da --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequest.java @@ -0,0 +1,1337 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for requesting list of `AuthzExtension` resources.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListAuthzExtensionsRequest} + */ +public final class ListAuthzExtensionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListAuthzExtensionsRequest) + ListAuthzExtensionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAuthzExtensionsRequest.newBuilder() to construct. + private ListAuthzExtensionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthzExtensionsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthzExtensionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.class, + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location from which the `AuthzExtension`
+   * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+   * resources are listed. These values are specified in the following 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. Requested page size. The server might return fewer items than
+   * requested. If unspecified, the server picks an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A token identifying a page of results that the server returns.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A token identifying a page of results that the server returns.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
+   * Optional. Hint about how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. Hint about how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.networkservices.v1.ListAuthzExtensionsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest other = + (com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest 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.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + 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.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + java.io.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.networkservices.v1.ListAuthzExtensionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseDelimitedFrom( + java.io.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.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListAuthzExtensionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for requesting list of `AuthzExtension` resources.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListAuthzExtensionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListAuthzExtensionsRequest) + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.class, + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest build() { + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest buildPartial() { + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest result = + new com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListAuthzExtensionsRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest other) { + if (other + == com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + 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 parent_ = ""; + + /** + * + * + *
+     * Required. The project and location from which the `AuthzExtension`
+     * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+     * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+     * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+     * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+     * resources are listed. These values are specified in the following 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 int pageSize_; + + /** + * + * + *
+     * Optional. Requested page size. The server might return fewer items than
+     * requested. If unspecified, the server picks an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. Requested page size. The server might return fewer items than
+     * requested. If unspecified, the server picks an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Requested page size. The server might return fewer items than
+     * requested. If unspecified, the server picks an appropriate default.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A token identifying a page of results that the server returns.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results that the server returns.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A token identifying a page of results that the server returns.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results that the server returns.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A token identifying a page of results that the server returns.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filtering results.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
+     * Optional. Hint about how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. Hint about how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. Hint about how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint about how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Hint about how to order the results.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.ListAuthzExtensionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListAuthzExtensionsRequest) + private static final com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest(); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthzExtensionsRequest 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.networkservices.v1.ListAuthzExtensionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequestOrBuilder.java new file mode 100644 index 000000000000..884ecca53eaf --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListAuthzExtensionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListAuthzExtensionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location from which the `AuthzExtension`
+   * resources are listed. These values are specified in the following 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 project and location from which the `AuthzExtension`
+   * resources are listed. These values are specified in the following 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. Requested page size. The server might return fewer items than
+   * requested. If unspecified, the server picks an appropriate default.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results that the server returns.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A token identifying a page of results that the server returns.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * Optional. Filtering results.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Hint about how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
+   * Optional. Hint about how to order the results.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponse.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponse.java new file mode 100644 index 000000000000..658b2cdca83a --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponse.java @@ -0,0 +1,1463 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for response to listing `AuthzExtension` resources.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListAuthzExtensionsResponse} + */ +public final class ListAuthzExtensionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListAuthzExtensionsResponse) + ListAuthzExtensionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAuthzExtensionsResponse.newBuilder() to construct. + private ListAuthzExtensionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAuthzExtensionsResponse() { + authzExtensions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAuthzExtensionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.class, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.Builder.class); + } + + public static final int AUTHZ_EXTENSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List authzExtensions_; + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + @java.lang.Override + public java.util.List + getAuthzExtensionsList() { + return authzExtensions_; + } + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + @java.lang.Override + public java.util.List + getAuthzExtensionsOrBuilderList() { + return authzExtensions_; + } + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + @java.lang.Override + public int getAuthzExtensionsCount() { + return authzExtensions_.size(); + } + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtensions(int index) { + return authzExtensions_.get(index); + } + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionsOrBuilder( + int index) { + return authzExtensions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token identifying a page of results that the server returns.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token identifying a page of results that the server returns.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < authzExtensions_.size(); i++) { + output.writeMessage(1, authzExtensions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < authzExtensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, authzExtensions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.networkservices.v1.ListAuthzExtensionsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse other = + (com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse) obj; + + if (!getAuthzExtensionsList().equals(other.getAuthzExtensionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getAuthzExtensionsCount() > 0) { + hash = (37 * hash) + AUTHZ_EXTENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getAuthzExtensionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse 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.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + 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.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + java.io.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.networkservices.v1.ListAuthzExtensionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseDelimitedFrom( + java.io.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.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListAuthzExtensionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for response to listing `AuthzExtension` resources.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListAuthzExtensionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListAuthzExtensionsResponse) + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.class, + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (authzExtensionsBuilder_ == null) { + authzExtensions_ = java.util.Collections.emptyList(); + } else { + authzExtensions_ = null; + authzExtensionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_ListAuthzExtensionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse build() { + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse buildPartial() { + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse result = + new com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse result) { + if (authzExtensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + authzExtensions_ = java.util.Collections.unmodifiableList(authzExtensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.authzExtensions_ = authzExtensions_; + } else { + result.authzExtensions_ = authzExtensionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListAuthzExtensionsResponse) { + return mergeFrom((com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse other) { + if (other + == com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse.getDefaultInstance()) + return this; + if (authzExtensionsBuilder_ == null) { + if (!other.authzExtensions_.isEmpty()) { + if (authzExtensions_.isEmpty()) { + authzExtensions_ = other.authzExtensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.addAll(other.authzExtensions_); + } + onChanged(); + } + } else { + if (!other.authzExtensions_.isEmpty()) { + if (authzExtensionsBuilder_.isEmpty()) { + authzExtensionsBuilder_.dispose(); + authzExtensionsBuilder_ = null; + authzExtensions_ = other.authzExtensions_; + bitField0_ = (bitField0_ & ~0x00000001); + authzExtensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAuthzExtensionsFieldBuilder() + : null; + } else { + authzExtensionsBuilder_.addAllMessages(other.authzExtensions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkservices.v1.AuthzExtension m = + input.readMessage( + com.google.cloud.networkservices.v1.AuthzExtension.parser(), + extensionRegistry); + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.add(m); + } else { + authzExtensionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List authzExtensions_ = + java.util.Collections.emptyList(); + + private void ensureAuthzExtensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + authzExtensions_ = + new java.util.ArrayList( + authzExtensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + authzExtensionsBuilder_; + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public java.util.List + getAuthzExtensionsList() { + if (authzExtensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(authzExtensions_); + } else { + return authzExtensionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public int getAuthzExtensionsCount() { + if (authzExtensionsBuilder_ == null) { + return authzExtensions_.size(); + } else { + return authzExtensionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtensions(int index) { + if (authzExtensionsBuilder_ == null) { + return authzExtensions_.get(index); + } else { + return authzExtensionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder setAuthzExtensions( + int index, com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthzExtensionsIsMutable(); + authzExtensions_.set(index, value); + onChanged(); + } else { + authzExtensionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder setAuthzExtensions( + int index, com.google.cloud.networkservices.v1.AuthzExtension.Builder builderForValue) { + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.set(index, builderForValue.build()); + onChanged(); + } else { + authzExtensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder addAuthzExtensions(com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthzExtensionsIsMutable(); + authzExtensions_.add(value); + onChanged(); + } else { + authzExtensionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder addAuthzExtensions( + int index, com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuthzExtensionsIsMutable(); + authzExtensions_.add(index, value); + onChanged(); + } else { + authzExtensionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder addAuthzExtensions( + com.google.cloud.networkservices.v1.AuthzExtension.Builder builderForValue) { + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.add(builderForValue.build()); + onChanged(); + } else { + authzExtensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder addAuthzExtensions( + int index, com.google.cloud.networkservices.v1.AuthzExtension.Builder builderForValue) { + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.add(index, builderForValue.build()); + onChanged(); + } else { + authzExtensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder addAllAuthzExtensions( + java.lang.Iterable values) { + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, authzExtensions_); + onChanged(); + } else { + authzExtensionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder clearAuthzExtensions() { + if (authzExtensionsBuilder_ == null) { + authzExtensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + authzExtensionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public Builder removeAuthzExtensions(int index) { + if (authzExtensionsBuilder_ == null) { + ensureAuthzExtensionsIsMutable(); + authzExtensions_.remove(index); + onChanged(); + } else { + authzExtensionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public com.google.cloud.networkservices.v1.AuthzExtension.Builder getAuthzExtensionsBuilder( + int index) { + return getAuthzExtensionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionsOrBuilder( + int index) { + if (authzExtensionsBuilder_ == null) { + return authzExtensions_.get(index); + } else { + return authzExtensionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public java.util.List + getAuthzExtensionsOrBuilderList() { + if (authzExtensionsBuilder_ != null) { + return authzExtensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(authzExtensions_); + } + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public com.google.cloud.networkservices.v1.AuthzExtension.Builder addAuthzExtensionsBuilder() { + return getAuthzExtensionsFieldBuilder() + .addBuilder(com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public com.google.cloud.networkservices.v1.AuthzExtension.Builder addAuthzExtensionsBuilder( + int index) { + return getAuthzExtensionsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of `AuthzExtension` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + public java.util.List + getAuthzExtensionsBuilderList() { + return getAuthzExtensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + getAuthzExtensionsFieldBuilder() { + if (authzExtensionsBuilder_ == null) { + authzExtensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder>( + authzExtensions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + authzExtensions_ = null; + } + return authzExtensionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token identifying a page of results that the server returns.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results that the server returns.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token identifying a page of results that the server returns.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results that the server returns.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token identifying a page of results that the server returns.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.networkservices.v1.ListAuthzExtensionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListAuthzExtensionsResponse) + private static final com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse(); + } + + public static com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAuthzExtensionsResponse 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.networkservices.v1.ListAuthzExtensionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponseOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponseOrBuilder.java new file mode 100644 index 000000000000..cd4abeae09b0 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAuthzExtensionsResponseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListAuthzExtensionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListAuthzExtensionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + java.util.List getAuthzExtensionsList(); + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtensions(int index); + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + int getAuthzExtensionsCount(); + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + java.util.List + getAuthzExtensionsOrBuilderList(); + + /** + * + * + *
+   * The list of `AuthzExtension` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.AuthzExtension authz_extensions = 1; + */ + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionsOrBuilder( + int index); + + /** + * + * + *
+   * A token identifying a page of results that the server returns.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token identifying a page of results that the server returns.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequest.java index d846bf1001a8..de5e2ccd2e71 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequest.java @@ -77,7 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The project and location from which the `LbRouteExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -105,7 +105,7 @@ public java.lang.String getParent() { * *
    * Required. The project and location from which the `LbRouteExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -263,7 +263,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -287,7 +287,7 @@ public java.lang.String getOrderBy() { * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -756,7 +756,7 @@ public Builder mergeFrom( * *
      * Required. The project and location from which the `LbRouteExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -783,7 +783,7 @@ public java.lang.String getParent() { * *
      * Required. The project and location from which the `LbRouteExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -810,7 +810,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The project and location from which the `LbRouteExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -836,7 +836,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The project and location from which the `LbRouteExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -858,7 +858,7 @@ public Builder clearParent() { * *
      * Required. The project and location from which the `LbRouteExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -1167,7 +1167,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1190,7 +1190,7 @@ public java.lang.String getOrderBy() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1213,7 +1213,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1235,7 +1235,7 @@ public Builder setOrderBy(java.lang.String value) { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1253,7 +1253,7 @@ public Builder clearOrderBy() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequestOrBuilder.java index 9e5afea530d6..9ff23fcb6208 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbRouteExtensionsRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface ListLbRouteExtensionsRequestOrBuilder * *
    * Required. The project and location from which the `LbRouteExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -46,7 +46,7 @@ public interface ListLbRouteExtensionsRequestOrBuilder * *
    * Required. The project and location from which the `LbRouteExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -128,7 +128,7 @@ public interface ListLbRouteExtensionsRequestOrBuilder * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -141,7 +141,7 @@ public interface ListLbRouteExtensionsRequestOrBuilder * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequest.java index ac9688eebb6f..889cabbe3f04 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequest.java @@ -78,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The project and location from which the `LbTrafficExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -106,7 +106,7 @@ public java.lang.String getParent() { * *
    * Required. The project and location from which the `LbTrafficExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -264,7 +264,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -288,7 +288,7 @@ public java.lang.String getOrderBy() { * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -761,7 +761,7 @@ public Builder mergeFrom( * *
      * Required. The project and location from which the `LbTrafficExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -788,7 +788,7 @@ public java.lang.String getParent() { * *
      * Required. The project and location from which the `LbTrafficExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -815,7 +815,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The project and location from which the `LbTrafficExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -841,7 +841,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The project and location from which the `LbTrafficExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -863,7 +863,7 @@ public Builder clearParent() { * *
      * Required. The project and location from which the `LbTrafficExtension`
-     * resources are listed, specified in the following format:
+     * resources are listed. These values are specified in the following format:
      * `projects/{project}/locations/{location}`.
      * 
* @@ -1172,7 +1172,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1195,7 +1195,7 @@ public java.lang.String getOrderBy() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1218,7 +1218,7 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1240,7 +1240,7 @@ public Builder setOrderBy(java.lang.String value) { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1258,7 +1258,7 @@ public Builder clearOrderBy() { * * *
-     * Optional. Hint for how to order the results.
+     * Optional. Hint about how to order the results.
      * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequestOrBuilder.java index f9a4b5a86c43..c264d0c42371 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListLbTrafficExtensionsRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface ListLbTrafficExtensionsRequestOrBuilder * *
    * Required. The project and location from which the `LbTrafficExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -46,7 +46,7 @@ public interface ListLbTrafficExtensionsRequestOrBuilder * *
    * Required. The project and location from which the `LbTrafficExtension`
-   * resources are listed, specified in the following format:
+   * resources are listed. These values are specified in the following format:
    * `projects/{project}/locations/{location}`.
    * 
* @@ -128,7 +128,7 @@ public interface ListLbTrafficExtensionsRequestOrBuilder * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -141,7 +141,7 @@ public interface ListLbTrafficExtensionsRequestOrBuilder * * *
-   * Optional. Hint for how to order the results.
+   * Optional. Hint about how to order the results.
    * 
* * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequest.java new file mode 100644 index 000000000000..61f2785bd0ed --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequest.java @@ -0,0 +1,991 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used with the `ListWasmPluginVersions` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginVersionsRequest} + */ +public final class ListWasmPluginVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) + ListWasmPluginVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListWasmPluginVersionsRequest.newBuilder() to construct. + private ListWasmPluginVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListWasmPluginVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListWasmPluginVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.class, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_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 `WasmPlugin` resource whose `WasmPluginVersion`s
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Maximum number of `WasmPluginVersion` resources to return per
+   * call. If not specified, at most 50 `WasmPluginVersion` resources are
+   * returned. The maximum value is 1000; values above 1000 are coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginVersionsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPluginVersions` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginVersionsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPluginVersions` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest other = + (com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest 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.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + 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.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + java.io.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.networkservices.v1.ListWasmPluginVersionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest + parseDelimitedFrom( + java.io.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.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListWasmPluginVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used with the `ListWasmPluginVersions` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.class, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest build() { + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest buildPartial() { + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest result = + new com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListWasmPluginVersionsRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest other) { + if (other + == com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 parent_ = ""; + + /** + * + * + *
+     * Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 `WasmPlugin` resource whose `WasmPluginVersion`s
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 `WasmPlugin` resource whose `WasmPluginVersion`s
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 `WasmPlugin` resource whose `WasmPluginVersion`s
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 `WasmPlugin` resource whose `WasmPluginVersion`s
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global/wasmPlugins/{wasm_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 int pageSize_; + + /** + * + * + *
+     * Maximum number of `WasmPluginVersion` resources to return per
+     * call. If not specified, at most 50 `WasmPluginVersion` resources are
+     * returned. The maximum value is 1000; values above 1000 are coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Maximum number of `WasmPluginVersion` resources to return per
+     * call. If not specified, at most 50 `WasmPluginVersion` resources are
+     * returned. The maximum value is 1000; values above 1000 are coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maximum number of `WasmPluginVersion` resources to return per
+     * call. If not specified, at most 50 `WasmPluginVersion` resources are
+     * returned. The maximum value is 1000; values above 1000 are coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginVersionsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPluginVersions` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginVersionsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPluginVersions` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginVersionsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPluginVersions` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginVersionsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPluginVersions` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginVersionsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPluginVersions` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + 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.networkservices.v1.ListWasmPluginVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) + private static final com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest(); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListWasmPluginVersionsRequest 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.networkservices.v1.ListWasmPluginVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..42a9d7ecfd99 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListWasmPluginVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListWasmPluginVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of `WasmPluginVersion` resources to return per
+   * call. If not specified, at most 50 `WasmPluginVersion` resources are
+   * returned. The maximum value is 1000; values above 1000 are coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginVersionsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPluginVersions` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginVersionsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPluginVersions` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponse.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponse.java new file mode 100644 index 000000000000..3940263c5578 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponse.java @@ -0,0 +1,1542 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Response returned by the `ListWasmPluginVersions` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginVersionsResponse} + */ +public final class ListWasmPluginVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) + ListWasmPluginVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListWasmPluginVersionsResponse.newBuilder() to construct. + private ListWasmPluginVersionsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListWasmPluginVersionsResponse() { + wasmPluginVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListWasmPluginVersionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.class, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.Builder.class); + } + + public static final int WASM_PLUGIN_VERSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List wasmPluginVersions_; + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getWasmPluginVersionsList() { + return wasmPluginVersions_; + } + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getWasmPluginVersionsOrBuilderList() { + return wasmPluginVersions_; + } + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + @java.lang.Override + public int getWasmPluginVersionsCount() { + return wasmPluginVersions_.size(); + } + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersions(int index) { + return wasmPluginVersions_.get(index); + } + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder + getWasmPluginVersionsOrBuilder(int index) { + return wasmPluginVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < wasmPluginVersions_.size(); i++) { + output.writeMessage(1, wasmPluginVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < wasmPluginVersions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, wasmPluginVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.networkservices.v1.ListWasmPluginVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse other = + (com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) obj; + + if (!getWasmPluginVersionsList().equals(other.getWasmPluginVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getWasmPluginVersionsCount() > 0) { + hash = (37 * hash) + WASM_PLUGIN_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getWasmPluginVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse 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.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + 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.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + java.io.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.networkservices.v1.ListWasmPluginVersionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + parseDelimitedFrom( + java.io.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.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListWasmPluginVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response returned by the `ListWasmPluginVersions` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.class, + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (wasmPluginVersionsBuilder_ == null) { + wasmPluginVersions_ = java.util.Collections.emptyList(); + } else { + wasmPluginVersions_ = null; + wasmPluginVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse build() { + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse buildPartial() { + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse result = + new com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse result) { + if (wasmPluginVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + wasmPluginVersions_ = java.util.Collections.unmodifiableList(wasmPluginVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.wasmPluginVersions_ = wasmPluginVersions_; + } else { + result.wasmPluginVersions_ = wasmPluginVersionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListWasmPluginVersionsResponse) { + return mergeFrom( + (com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse other) { + if (other + == com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + .getDefaultInstance()) return this; + if (wasmPluginVersionsBuilder_ == null) { + if (!other.wasmPluginVersions_.isEmpty()) { + if (wasmPluginVersions_.isEmpty()) { + wasmPluginVersions_ = other.wasmPluginVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.addAll(other.wasmPluginVersions_); + } + onChanged(); + } + } else { + if (!other.wasmPluginVersions_.isEmpty()) { + if (wasmPluginVersionsBuilder_.isEmpty()) { + wasmPluginVersionsBuilder_.dispose(); + wasmPluginVersionsBuilder_ = null; + wasmPluginVersions_ = other.wasmPluginVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + wasmPluginVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWasmPluginVersionsFieldBuilder() + : null; + } else { + wasmPluginVersionsBuilder_.addAllMessages(other.wasmPluginVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkservices.v1.WasmPluginVersion m = + input.readMessage( + com.google.cloud.networkservices.v1.WasmPluginVersion.parser(), + extensionRegistry); + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.add(m); + } else { + wasmPluginVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + wasmPluginVersions_ = java.util.Collections.emptyList(); + + private void ensureWasmPluginVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + wasmPluginVersions_ = + new java.util.ArrayList( + wasmPluginVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder> + wasmPluginVersionsBuilder_; + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public java.util.List + getWasmPluginVersionsList() { + if (wasmPluginVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(wasmPluginVersions_); + } else { + return wasmPluginVersionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public int getWasmPluginVersionsCount() { + if (wasmPluginVersionsBuilder_ == null) { + return wasmPluginVersions_.size(); + } else { + return wasmPluginVersionsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersions(int index) { + if (wasmPluginVersionsBuilder_ == null) { + return wasmPluginVersions_.get(index); + } else { + return wasmPluginVersionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder setWasmPluginVersions( + int index, com.google.cloud.networkservices.v1.WasmPluginVersion value) { + if (wasmPluginVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.set(index, value); + onChanged(); + } else { + wasmPluginVersionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder setWasmPluginVersions( + int index, com.google.cloud.networkservices.v1.WasmPluginVersion.Builder builderForValue) { + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + wasmPluginVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder addWasmPluginVersions( + com.google.cloud.networkservices.v1.WasmPluginVersion value) { + if (wasmPluginVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.add(value); + onChanged(); + } else { + wasmPluginVersionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder addWasmPluginVersions( + int index, com.google.cloud.networkservices.v1.WasmPluginVersion value) { + if (wasmPluginVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.add(index, value); + onChanged(); + } else { + wasmPluginVersionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder addWasmPluginVersions( + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder builderForValue) { + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.add(builderForValue.build()); + onChanged(); + } else { + wasmPluginVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder addWasmPluginVersions( + int index, com.google.cloud.networkservices.v1.WasmPluginVersion.Builder builderForValue) { + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + wasmPluginVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder addAllWasmPluginVersions( + java.lang.Iterable + values) { + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, wasmPluginVersions_); + onChanged(); + } else { + wasmPluginVersionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder clearWasmPluginVersions() { + if (wasmPluginVersionsBuilder_ == null) { + wasmPluginVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wasmPluginVersionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public Builder removeWasmPluginVersions(int index) { + if (wasmPluginVersionsBuilder_ == null) { + ensureWasmPluginVersionsIsMutable(); + wasmPluginVersions_.remove(index); + onChanged(); + } else { + wasmPluginVersionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion.Builder + getWasmPluginVersionsBuilder(int index) { + return getWasmPluginVersionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder + getWasmPluginVersionsOrBuilder(int index) { + if (wasmPluginVersionsBuilder_ == null) { + return wasmPluginVersions_.get(index); + } else { + return wasmPluginVersionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public java.util.List + getWasmPluginVersionsOrBuilderList() { + if (wasmPluginVersionsBuilder_ != null) { + return wasmPluginVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(wasmPluginVersions_); + } + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion.Builder + addWasmPluginVersionsBuilder() { + return getWasmPluginVersionsFieldBuilder() + .addBuilder(com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginVersion.Builder + addWasmPluginVersionsBuilder(int index) { + return getWasmPluginVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance()); + } + + /** + * + * + *
+     * List of `WasmPluginVersion` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + public java.util.List + getWasmPluginVersionsBuilderList() { + return getWasmPluginVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder> + getWasmPluginVersionsFieldBuilder() { + if (wasmPluginVersionsBuilder_ == null) { + wasmPluginVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPluginVersion, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder, + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder>( + wasmPluginVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + wasmPluginVersions_ = null; + } + return wasmPluginVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.networkservices.v1.ListWasmPluginVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) + private static final com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse(); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListWasmPluginVersionsResponse 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.networkservices.v1.ListWasmPluginVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponseOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..546e658d3f3f --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginVersionsResponseOrBuilder.java @@ -0,0 +1,182 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListWasmPluginVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListWasmPluginVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + java.util.List getWasmPluginVersionsList(); + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + com.google.cloud.networkservices.v1.WasmPluginVersion getWasmPluginVersions(int index); + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + int getWasmPluginVersionsCount(); + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + java.util.List + getWasmPluginVersionsOrBuilderList(); + + /** + * + * + *
+   * List of `WasmPluginVersion` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPluginVersion wasm_plugin_versions = 1; + * + */ + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder getWasmPluginVersionsOrBuilder( + int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequest.java new file mode 100644 index 000000000000..f27313b94f2f --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequest.java @@ -0,0 +1,978 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used with the `ListWasmPlugins` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginsRequest} + */ +public final class ListWasmPluginsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListWasmPluginsRequest) + ListWasmPluginsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListWasmPluginsRequest.newBuilder() to construct. + private ListWasmPluginsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListWasmPluginsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListWasmPluginsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest.class, + com.google.cloud.networkservices.v1.ListWasmPluginsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The project and location from which the `WasmPlugin` resources
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global`.
+   * 
+ * + * + * 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 project and location from which the `WasmPlugin` resources
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Maximum number of `WasmPlugin` resources to return per call.
+   * If not specified, at most 50 `WasmPlugin` resources are returned.
+   * The maximum value is 1000; values above 1000 are coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPlugins` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPlugins` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.networkservices.v1.ListWasmPluginsRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListWasmPluginsRequest other = + (com.google.cloud.networkservices.v1.ListWasmPluginsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest 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.networkservices.v1.ListWasmPluginsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + 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.networkservices.v1.ListWasmPluginsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + java.io.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.networkservices.v1.ListWasmPluginsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseDelimitedFrom( + java.io.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.networkservices.v1.ListWasmPluginsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListWasmPluginsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used with the `ListWasmPlugins` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListWasmPluginsRequest) + com.google.cloud.networkservices.v1.ListWasmPluginsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginsRequest.class, + com.google.cloud.networkservices.v1.ListWasmPluginsRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListWasmPluginsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListWasmPluginsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsRequest build() { + com.google.cloud.networkservices.v1.ListWasmPluginsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsRequest buildPartial() { + com.google.cloud.networkservices.v1.ListWasmPluginsRequest result = + new com.google.cloud.networkservices.v1.ListWasmPluginsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.ListWasmPluginsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListWasmPluginsRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.ListWasmPluginsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.ListWasmPluginsRequest other) { + if (other == com.google.cloud.networkservices.v1.ListWasmPluginsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = 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 parent_ = ""; + + /** + * + * + *
+     * Required. The project and location from which the `WasmPlugin` resources
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 project and location from which the `WasmPlugin` resources
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 project and location from which the `WasmPlugin` resources
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 project and location from which the `WasmPlugin` resources
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 project and location from which the `WasmPlugin` resources
+     * are listed, specified in the following format:
+     * `projects/{project}/locations/global`.
+     * 
+ * + * + * 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 int pageSize_; + + /** + * + * + *
+     * Maximum number of `WasmPlugin` resources to return per call.
+     * If not specified, at most 50 `WasmPlugin` resources are returned.
+     * The maximum value is 1000; values above 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Maximum number of `WasmPlugin` resources to return per call.
+     * If not specified, at most 50 `WasmPlugin` resources are returned.
+     * The maximum value is 1000; values above 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Maximum number of `WasmPlugin` resources to return per call.
+     * If not specified, at most 50 `WasmPlugin` resources are returned.
+     * The maximum value is 1000; values above 1000 are coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPlugins` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPlugins` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPlugins` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPlugins` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The value returned by the last `ListWasmPluginsResponse` call.
+     * Indicates that this is a continuation of a prior
+     * `ListWasmPlugins` call, and that the
+     * next page of data is to be returned.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + 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.networkservices.v1.ListWasmPluginsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListWasmPluginsRequest) + private static final com.google.cloud.networkservices.v1.ListWasmPluginsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListWasmPluginsRequest(); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListWasmPluginsRequest 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.networkservices.v1.ListWasmPluginsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequestOrBuilder.java new file mode 100644 index 000000000000..881ba804110d --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListWasmPluginsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListWasmPluginsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The project and location from which the `WasmPlugin` resources
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The project and location from which the `WasmPlugin` resources
+   * are listed, specified in the following format:
+   * `projects/{project}/locations/global`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of `WasmPlugin` resources to return per call.
+   * If not specified, at most 50 `WasmPlugin` resources are returned.
+   * The maximum value is 1000; values above 1000 are coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPlugins` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * The value returned by the last `ListWasmPluginsResponse` call.
+   * Indicates that this is a continuation of a prior
+   * `ListWasmPlugins` call, and that the
+   * next page of data is to be returned.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponse.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponse.java new file mode 100644 index 000000000000..0ce7559eedac --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponse.java @@ -0,0 +1,1491 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Response returned by the `ListWasmPlugins` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginsResponse} + */ +public final class ListWasmPluginsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListWasmPluginsResponse) + ListWasmPluginsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListWasmPluginsResponse.newBuilder() to construct. + private ListWasmPluginsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListWasmPluginsResponse() { + wasmPlugins_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListWasmPluginsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginsResponse.class, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse.Builder.class); + } + + public static final int WASM_PLUGINS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List wasmPlugins_; + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + @java.lang.Override + public java.util.List getWasmPluginsList() { + return wasmPlugins_; + } + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + @java.lang.Override + public java.util.List + getWasmPluginsOrBuilderList() { + return wasmPlugins_; + } + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + @java.lang.Override + public int getWasmPluginsCount() { + return wasmPlugins_.size(); + } + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugins(int index) { + return wasmPlugins_.get(index); + } + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginsOrBuilder( + int index) { + return wasmPlugins_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 < wasmPlugins_.size(); i++) { + output.writeMessage(1, wasmPlugins_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(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 < wasmPlugins_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, wasmPlugins_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.networkservices.v1.ListWasmPluginsResponse)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListWasmPluginsResponse other = + (com.google.cloud.networkservices.v1.ListWasmPluginsResponse) obj; + + if (!getWasmPluginsList().equals(other.getWasmPluginsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getWasmPluginsCount() > 0) { + hash = (37 * hash) + WASM_PLUGINS_FIELD_NUMBER; + hash = (53 * hash) + getWasmPluginsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse 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.networkservices.v1.ListWasmPluginsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + 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.networkservices.v1.ListWasmPluginsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + java.io.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.networkservices.v1.ListWasmPluginsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseDelimitedFrom( + java.io.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.networkservices.v1.ListWasmPluginsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.ListWasmPluginsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Response returned by the `ListWasmPlugins` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.ListWasmPluginsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListWasmPluginsResponse) + com.google.cloud.networkservices.v1.ListWasmPluginsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListWasmPluginsResponse.class, + com.google.cloud.networkservices.v1.ListWasmPluginsResponse.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListWasmPluginsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (wasmPluginsBuilder_ == null) { + wasmPlugins_ = java.util.Collections.emptyList(); + } else { + wasmPlugins_ = null; + wasmPluginsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_ListWasmPluginsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsResponse getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListWasmPluginsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsResponse build() { + com.google.cloud.networkservices.v1.ListWasmPluginsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListWasmPluginsResponse buildPartial() { + com.google.cloud.networkservices.v1.ListWasmPluginsResponse result = + new com.google.cloud.networkservices.v1.ListWasmPluginsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkservices.v1.ListWasmPluginsResponse result) { + if (wasmPluginsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + wasmPlugins_ = java.util.Collections.unmodifiableList(wasmPlugins_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.wasmPlugins_ = wasmPlugins_; + } else { + result.wasmPlugins_ = wasmPluginsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkservices.v1.ListWasmPluginsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.ListWasmPluginsResponse) { + return mergeFrom((com.google.cloud.networkservices.v1.ListWasmPluginsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.ListWasmPluginsResponse other) { + if (other == com.google.cloud.networkservices.v1.ListWasmPluginsResponse.getDefaultInstance()) + return this; + if (wasmPluginsBuilder_ == null) { + if (!other.wasmPlugins_.isEmpty()) { + if (wasmPlugins_.isEmpty()) { + wasmPlugins_ = other.wasmPlugins_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWasmPluginsIsMutable(); + wasmPlugins_.addAll(other.wasmPlugins_); + } + onChanged(); + } + } else { + if (!other.wasmPlugins_.isEmpty()) { + if (wasmPluginsBuilder_.isEmpty()) { + wasmPluginsBuilder_.dispose(); + wasmPluginsBuilder_ = null; + wasmPlugins_ = other.wasmPlugins_; + bitField0_ = (bitField0_ & ~0x00000001); + wasmPluginsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWasmPluginsFieldBuilder() + : null; + } else { + wasmPluginsBuilder_.addAllMessages(other.wasmPlugins_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkservices.v1.WasmPlugin m = + input.readMessage( + com.google.cloud.networkservices.v1.WasmPlugin.parser(), extensionRegistry); + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + wasmPlugins_.add(m); + } else { + wasmPluginsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List wasmPlugins_ = + java.util.Collections.emptyList(); + + private void ensureWasmPluginsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + wasmPlugins_ = + new java.util.ArrayList(wasmPlugins_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + wasmPluginsBuilder_; + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public java.util.List getWasmPluginsList() { + if (wasmPluginsBuilder_ == null) { + return java.util.Collections.unmodifiableList(wasmPlugins_); + } else { + return wasmPluginsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public int getWasmPluginsCount() { + if (wasmPluginsBuilder_ == null) { + return wasmPlugins_.size(); + } else { + return wasmPluginsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugins(int index) { + if (wasmPluginsBuilder_ == null) { + return wasmPlugins_.get(index); + } else { + return wasmPluginsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder setWasmPlugins(int index, com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginsIsMutable(); + wasmPlugins_.set(index, value); + onChanged(); + } else { + wasmPluginsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder setWasmPlugins( + int index, com.google.cloud.networkservices.v1.WasmPlugin.Builder builderForValue) { + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + wasmPlugins_.set(index, builderForValue.build()); + onChanged(); + } else { + wasmPluginsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder addWasmPlugins(com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginsIsMutable(); + wasmPlugins_.add(value); + onChanged(); + } else { + wasmPluginsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder addWasmPlugins(int index, com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWasmPluginsIsMutable(); + wasmPlugins_.add(index, value); + onChanged(); + } else { + wasmPluginsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder addWasmPlugins( + com.google.cloud.networkservices.v1.WasmPlugin.Builder builderForValue) { + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + wasmPlugins_.add(builderForValue.build()); + onChanged(); + } else { + wasmPluginsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder addWasmPlugins( + int index, com.google.cloud.networkservices.v1.WasmPlugin.Builder builderForValue) { + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + wasmPlugins_.add(index, builderForValue.build()); + onChanged(); + } else { + wasmPluginsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder addAllWasmPlugins( + java.lang.Iterable values) { + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, wasmPlugins_); + onChanged(); + } else { + wasmPluginsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder clearWasmPlugins() { + if (wasmPluginsBuilder_ == null) { + wasmPlugins_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + wasmPluginsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public Builder removeWasmPlugins(int index) { + if (wasmPluginsBuilder_ == null) { + ensureWasmPluginsIsMutable(); + wasmPlugins_.remove(index); + onChanged(); + } else { + wasmPluginsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public com.google.cloud.networkservices.v1.WasmPlugin.Builder getWasmPluginsBuilder(int index) { + return getWasmPluginsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginsOrBuilder( + int index) { + if (wasmPluginsBuilder_ == null) { + return wasmPlugins_.get(index); + } else { + return wasmPluginsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public java.util.List + getWasmPluginsOrBuilderList() { + if (wasmPluginsBuilder_ != null) { + return wasmPluginsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(wasmPlugins_); + } + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public com.google.cloud.networkservices.v1.WasmPlugin.Builder addWasmPluginsBuilder() { + return getWasmPluginsFieldBuilder() + .addBuilder(com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance()); + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public com.google.cloud.networkservices.v1.WasmPlugin.Builder addWasmPluginsBuilder(int index) { + return getWasmPluginsFieldBuilder() + .addBuilder(index, com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance()); + } + + /** + * + * + *
+     * List of `WasmPlugin` resources.
+     * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + public java.util.List + getWasmPluginsBuilderList() { + return getWasmPluginsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + getWasmPluginsFieldBuilder() { + if (wasmPluginsBuilder_ == null) { + wasmPluginsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder>( + wasmPlugins_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + wasmPlugins_ = null; + } + return wasmPluginsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * If there might be more results than those appearing in this response, then
+     * `next_page_token` is included. To get the next set of results,
+     * call this method again using the value of `next_page_token` as
+     * `page_token`.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Unreachable resources. Populated when the request attempts to list all
+     * resources across all supported locations, while some locations are
+     * temporarily unavailable.
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(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.networkservices.v1.ListWasmPluginsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListWasmPluginsResponse) + private static final com.google.cloud.networkservices.v1.ListWasmPluginsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListWasmPluginsResponse(); + } + + public static com.google.cloud.networkservices.v1.ListWasmPluginsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListWasmPluginsResponse 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.networkservices.v1.ListWasmPluginsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponseOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponseOrBuilder.java new file mode 100644 index 000000000000..c5a0a9312322 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListWasmPluginsResponseOrBuilder.java @@ -0,0 +1,176 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface ListWasmPluginsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListWasmPluginsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + java.util.List getWasmPluginsList(); + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugins(int index); + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + int getWasmPluginsCount(); + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + java.util.List + getWasmPluginsOrBuilderList(); + + /** + * + * + *
+   * List of `WasmPlugin` resources.
+   * 
+ * + * repeated .google.cloud.networkservices.v1.WasmPlugin wasm_plugins = 1; + */ + com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginsOrBuilder(int index); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * If there might be more results than those appearing in this response, then
+   * `next_page_token` is included. To get the next set of results,
+   * call this method again using the value of `next_page_token` as
+   * `page_token`.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
+   * Unreachable resources. Populated when the request attempts to list all
+   * resources across all supported locations, while some locations are
+   * temporarily unavailable.
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LoadBalancingScheme.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LoadBalancingScheme.java index 9368946b8ed2..893ac9605650 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LoadBalancingScheme.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/LoadBalancingScheme.java @@ -23,10 +23,10 @@ * * *
- * Load balancing schemes supported by the `LbTrafficExtension` resource and
- * `LbRouteExtension` resource.
- * For more information, refer to [Choosing a load
- * balancer](https://cloud.google.com/load-balancing/docs/backend-service).
+ * Load balancing schemes supported by the `LbTrafficExtension`,
+ * `LbRouteExtension`, and `LbEdgeExtension` resources.
+ * For more information, refer to [Backend services
+ * overview](https://cloud.google.com/load-balancing/docs/backend-service).
  * 
* * Protobuf enum {@code google.cloud.networkservices.v1.LoadBalancingScheme} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java index 6deaf8d5ed02..1d7c59bca967 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java @@ -42,319 +42,377 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027google/api/client.proto\032,google/cloud/n" + "etworkservices/v1/common.proto\0325google/c" + "loud/networkservices/v1/endpoint_policy." - + "proto\032-google/cloud/networkservices/v1/g" - + "ateway.proto\0320google/cloud/networkservic" - + "es/v1/grpc_route.proto\0320google/cloud/net" - + "workservices/v1/http_route.proto\032*google" - + "/cloud/networkservices/v1/mesh.proto\0320go" - + "ogle/cloud/networkservices/v1/route_view" - + ".proto\0325google/cloud/networkservices/v1/" - + "service_binding.proto\0327google/cloud/netw" - + "orkservices/v1/service_lb_policy.proto\032/" - + "google/cloud/networkservices/v1/tcp_rout" - + "e.proto\032/google/cloud/networkservices/v1" - + "/tls_route.proto\032#google/longrunning/ope" - + "rations.proto2\350[\n\017NetworkServices\022\332\001\n\024Li" - + "stEndpointPolicies\022<.google.cloud.networ" - + "kservices.v1.ListEndpointPoliciesRequest" - + "\032=.google.cloud.networkservices.v1.ListE" - + "ndpointPoliciesResponse\"E\332A\006parent\202\323\344\223\0026" - + "\0224/v1/{parent=projects/*/locations/*}/en" - + "dpointPolicies\022\304\001\n\021GetEndpointPolicy\0229.g" - + "oogle.cloud.networkservices.v1.GetEndpoi" - + "ntPolicyRequest\032/.google.cloud.networkse" - + "rvices.v1.EndpointPolicy\"C\332A\004name\202\323\344\223\0026\022" - + "4/v1/{name=projects/*/locations/*/endpoi" - + "ntPolicies/*}\022\265\002\n\024CreateEndpointPolicy\022<" - + ".google.cloud.networkservices.v1.CreateE" - + "ndpointPolicyRequest\032\035.google.longrunnin" - + "g.Operation\"\277\001\312AC\n\016EndpointPolicy\0221googl" - + "e.cloud.networkservices.v1.OperationMeta" - + "data\332A)parent,endpoint_policy,endpoint_p" - + "olicy_id\202\323\344\223\002G\"4/v1/{parent=projects/*/l" - + "ocations/*}/endpointPolicies:\017endpoint_p" - + "olicy\022\267\002\n\024UpdateEndpointPolicy\022<.google." - + "cloud.networkservices.v1.UpdateEndpointP" - + "olicyRequest\032\035.google.longrunning.Operat" - + "ion\"\301\001\312AC\n\016EndpointPolicy\0221google.cloud." - + "networkservices.v1.OperationMetadata\332A\033e" - + "ndpoint_policy,update_mask\202\323\344\223\002W2D/v1/{e" - + "ndpoint_policy.name=projects/*/locations" - + "/*/endpointPolicies/*}:\017endpoint_policy\022" - + "\206\002\n\024DeleteEndpointPolicy\022<.google.cloud." - + "networkservices.v1.DeleteEndpointPolicyR" - + "equest\032\035.google.longrunning.Operation\"\220\001" - + "\312AJ\n\025google.protobuf.Empty\0221google.cloud" - + ".networkservices.v1.OperationMetadata\332A\004" - + "name\202\323\344\223\0026*4/v1/{name=projects/*/locatio" - + "ns/*/endpointPolicies/*}\022\272\001\n\014ListGateway" - + "s\0224.google.cloud.networkservices.v1.List" - + "GatewaysRequest\0325.google.cloud.networkse" - + "rvices.v1.ListGatewaysResponse\"=\332A\006paren" - + "t\202\323\344\223\002.\022,/v1/{parent=projects/*/location" - + "s/*}/gateways\022\247\001\n\nGetGateway\0222.google.cl" - + "oud.networkservices.v1.GetGatewayRequest" - + "\032(.google.cloud.networkservices.v1.Gatew" - + "ay\";\332A\004name\202\323\344\223\002.\022,/v1/{name=projects/*/" - + "locations/*/gateways/*}\022\200\002\n\rCreateGatewa" - + "y\0225.google.cloud.networkservices.v1.Crea" - + "teGatewayRequest\032\035.google.longrunning.Op" - + "eration\"\230\001\312A<\n\007Gateway\0221google.cloud.net" - + "workservices.v1.OperationMetadata\332A\031pare" - + "nt,gateway,gateway_id\202\323\344\223\0027\",/v1/{parent" - + "=projects/*/locations/*}/gateways:\007gatew" - + "ay\022\202\002\n\rUpdateGateway\0225.google.cloud.netw" - + "orkservices.v1.UpdateGatewayRequest\032\035.go" - + "ogle.longrunning.Operation\"\232\001\312A<\n\007Gatewa" - + "y\0221google.cloud.networkservices.v1.Opera" - + "tionMetadata\332A\023gateway,update_mask\202\323\344\223\002?" - + "24/v1/{gateway.name=projects/*/locations" - + "/*/gateways/*}:\007gateway\022\360\001\n\rDeleteGatewa" - + "y\0225.google.cloud.networkservices.v1.Dele" - + "teGatewayRequest\032\035.google.longrunning.Op" - + "eration\"\210\001\312AJ\n\025google.protobuf.Empty\0221go" - + "ogle.cloud.networkservices.v1.OperationM" - + "etadata\332A\004name\202\323\344\223\002.*,/v1/{name=projects" - + "/*/locations/*/gateways/*}\022\302\001\n\016ListGrpcR" - + "outes\0226.google.cloud.networkservices.v1." - + "ListGrpcRoutesRequest\0327.google.cloud.net" - + "workservices.v1.ListGrpcRoutesResponse\"?" - + "\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects/*/" - + "locations/*}/grpcRoutes\022\257\001\n\014GetGrpcRoute" - + "\0224.google.cloud.networkservices.v1.GetGr" - + "pcRouteRequest\032*.google.cloud.networkser" - + "vices.v1.GrpcRoute\"=\332A\004name\202\323\344\223\0020\022./v1/{" - + "name=projects/*/locations/*/grpcRoutes/*" - + "}\022\221\002\n\017CreateGrpcRoute\0227.google.cloud.net" - + "workservices.v1.CreateGrpcRouteRequest\032\035" - + ".google.longrunning.Operation\"\245\001\312A>\n\tGrp" - + "cRoute\0221google.cloud.networkservices.v1." - + "OperationMetadata\332A\037parent,grpc_route,gr" - + "pc_route_id\202\323\344\223\002<\"./v1/{parent=projects/" - + "*/locations/*}/grpcRoutes:\ngrpc_route\022\223\002" - + "\n\017UpdateGrpcRoute\0227.google.cloud.network" - + "services.v1.UpdateGrpcRouteRequest\032\035.goo" - + "gle.longrunning.Operation\"\247\001\312A>\n\tGrpcRou" - + "te\0221google.cloud.networkservices.v1.Oper" - + "ationMetadata\332A\026grpc_route,update_mask\202\323" - + "\344\223\002G29/v1/{grpc_route.name=projects/*/lo" - + "cations/*/grpcRoutes/*}:\ngrpc_route\022\366\001\n\017" - + "DeleteGrpcRoute\0227.google.cloud.networkse" - + "rvices.v1.DeleteGrpcRouteRequest\032\035.googl" - + "e.longrunning.Operation\"\212\001\312AJ\n\025google.pr" - + "otobuf.Empty\0221google.cloud.networkservic" - + "es.v1.OperationMetadata\332A\004name\202\323\344\223\0020*./v" - + "1/{name=projects/*/locations/*/grpcRoute" - + "s/*}\022\302\001\n\016ListHttpRoutes\0226.google.cloud.n" - + "etworkservices.v1.ListHttpRoutesRequest\032" - + "7.google.cloud.networkservices.v1.ListHt" - + "tpRoutesResponse\"?\332A\006parent\202\323\344\223\0020\022./v1/{" - + "parent=projects/*/locations/*}/httpRoute" - + "s\022\257\001\n\014GetHttpRoute\0224.google.cloud.networ" - + "kservices.v1.GetHttpRouteRequest\032*.googl" - + "e.cloud.networkservices.v1.HttpRoute\"=\332A" - + "\004name\202\323\344\223\0020\022./v1/{name=projects/*/locati" - + "ons/*/httpRoutes/*}\022\221\002\n\017CreateHttpRoute\022" - + "7.google.cloud.networkservices.v1.Create" - + "HttpRouteRequest\032\035.google.longrunning.Op" - + "eration\"\245\001\312A>\n\tHttpRoute\0221google.cloud.n" - + "etworkservices.v1.OperationMetadata\332A\037pa" - + "rent,http_route,http_route_id\202\323\344\223\002<\"./v1" - + "/{parent=projects/*/locations/*}/httpRou" - + "tes:\nhttp_route\022\223\002\n\017UpdateHttpRoute\0227.go" - + "ogle.cloud.networkservices.v1.UpdateHttp" - + "RouteRequest\032\035.google.longrunning.Operat" - + "ion\"\247\001\312A>\n\tHttpRoute\0221google.cloud.netwo" - + "rkservices.v1.OperationMetadata\332A\026http_r" - + "oute,update_mask\202\323\344\223\002G29/v1/{http_route." - + "name=projects/*/locations/*/httpRoutes/*" - + "}:\nhttp_route\022\366\001\n\017DeleteHttpRoute\0227.goog" - + "le.cloud.networkservices.v1.DeleteHttpRo" - + "uteRequest\032\035.google.longrunning.Operatio" - + "n\"\212\001\312AJ\n\025google.protobuf.Empty\0221google.c" - + "loud.networkservices.v1.OperationMetadat" - + "a\332A\004name\202\323\344\223\0020*./v1/{name=projects/*/loc" - + "ations/*/httpRoutes/*}\022\276\001\n\rListTcpRoutes" - + "\0225.google.cloud.networkservices.v1.ListT" - + "cpRoutesRequest\0326.google.cloud.networkse" - + "rvices.v1.ListTcpRoutesResponse\">\332A\006pare" - + "nt\202\323\344\223\002/\022-/v1/{parent=projects/*/locatio" - + "ns/*}/tcpRoutes\022\253\001\n\013GetTcpRoute\0223.google" - + ".cloud.networkservices.v1.GetTcpRouteReq" - + "uest\032).google.cloud.networkservices.v1.T" - + "cpRoute\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=projec" - + "ts/*/locations/*/tcpRoutes/*}\022\212\002\n\016Create" - + "TcpRoute\0226.google.cloud.networkservices." - + "v1.CreateTcpRouteRequest\032\035.google.longru" - + "nning.Operation\"\240\001\312A=\n\010TcpRoute\0221google." - + "cloud.networkservices.v1.OperationMetada" - + "ta\332A\035parent,tcp_route,tcp_route_id\202\323\344\223\002:" - + "\"-/v1/{parent=projects/*/locations/*}/tc" - + "pRoutes:\ttcp_route\022\214\002\n\016UpdateTcpRoute\0226." - + "google.cloud.networkservices.v1.UpdateTc" - + "pRouteRequest\032\035.google.longrunning.Opera" - + "tion\"\242\001\312A=\n\010TcpRoute\0221google.cloud.netwo" - + "rkservices.v1.OperationMetadata\332A\025tcp_ro" - + "ute,update_mask\202\323\344\223\002D27/v1/{tcp_route.na" - + "me=projects/*/locations/*/tcpRoutes/*}:\t" - + "tcp_route\022\363\001\n\016DeleteTcpRoute\0226.google.cl" - + "oud.networkservices.v1.DeleteTcpRouteReq" - + "uest\032\035.google.longrunning.Operation\"\211\001\312A" + + "proto\0323google/cloud/networkservices/v1/e" + + "xtensibility.proto\032-google/cloud/network" + + "services/v1/gateway.proto\0320google/cloud/" + + "networkservices/v1/grpc_route.proto\0320goo" + + "gle/cloud/networkservices/v1/http_route." + + "proto\032*google/cloud/networkservices/v1/m" + + "esh.proto\0320google/cloud/networkservices/" + + "v1/route_view.proto\0325google/cloud/networ" + + "kservices/v1/service_binding.proto\0327goog" + + "le/cloud/networkservices/v1/service_lb_p" + + "olicy.proto\032/google/cloud/networkservice" + + "s/v1/tcp_route.proto\032/google/cloud/netwo" + + "rkservices/v1/tls_route.proto\032#google/lo" + + "ngrunning/operations.proto\032\033google/proto" + + "buf/empty.proto2\302m\n\017NetworkServices\022\332\001\n\024" + + "ListEndpointPolicies\022<.google.cloud.netw" + + "orkservices.v1.ListEndpointPoliciesReque" + + "st\032=.google.cloud.networkservices.v1.Lis" + + "tEndpointPoliciesResponse\"E\332A\006parent\202\323\344\223" + + "\0026\0224/v1/{parent=projects/*/locations/*}/" + + "endpointPolicies\022\304\001\n\021GetEndpointPolicy\0229" + + ".google.cloud.networkservices.v1.GetEndp" + + "ointPolicyRequest\032/.google.cloud.network" + + "services.v1.EndpointPolicy\"C\332A\004name\202\323\344\223\002" + + "6\0224/v1/{name=projects/*/locations/*/endp" + + "ointPolicies/*}\022\265\002\n\024CreateEndpointPolicy" + + "\022<.google.cloud.networkservices.v1.Creat" + + "eEndpointPolicyRequest\032\035.google.longrunn" + + "ing.Operation\"\277\001\312AC\n\016EndpointPolicy\0221goo" + + "gle.cloud.networkservices.v1.OperationMe" + + "tadata\332A)parent,endpoint_policy,endpoint" + + "_policy_id\202\323\344\223\002G\"4/v1/{parent=projects/*" + + "/locations/*}/endpointPolicies:\017endpoint" + + "_policy\022\267\002\n\024UpdateEndpointPolicy\022<.googl" + + "e.cloud.networkservices.v1.UpdateEndpoin" + + "tPolicyRequest\032\035.google.longrunning.Oper" + + "ation\"\301\001\312AC\n\016EndpointPolicy\0221google.clou" + + "d.networkservices.v1.OperationMetadata\332A" + + "\033endpoint_policy,update_mask\202\323\344\223\002W2D/v1/" + + "{endpoint_policy.name=projects/*/locatio" + + "ns/*/endpointPolicies/*}:\017endpoint_polic" + + "y\022\206\002\n\024DeleteEndpointPolicy\022<.google.clou" + + "d.networkservices.v1.DeleteEndpointPolic" + + "yRequest\032\035.google.longrunning.Operation\"" + + "\220\001\312AJ\n\025google.protobuf.Empty\0221google.clo" + + "ud.networkservices.v1.OperationMetadata\332" + + "A\004name\202\323\344\223\0026*4/v1/{name=projects/*/locat" + + "ions/*/endpointPolicies/*}\022\346\001\n\026ListWasmP" + + "luginVersions\022>.google.cloud.networkserv" + + "ices.v1.ListWasmPluginVersionsRequest\032?." + + "google.cloud.networkservices.v1.ListWasm" + + "PluginVersionsResponse\"K\332A\006parent\202\323\344\223\002<\022" + + ":/v1/{parent=projects/*/locations/*/wasm" + + "Plugins/*}/versions\022\323\001\n\024GetWasmPluginVer" + + "sion\022<.google.cloud.networkservices.v1.G" + + "etWasmPluginVersionRequest\0322.google.clou" + + "d.networkservices.v1.WasmPluginVersion\"I" + + "\332A\004name\202\323\344\223\002<\022:/v1/{name=projects/*/loca" + + "tions/*/wasmPlugins/*/versions/*}\022\320\002\n\027Cr" + + "eateWasmPluginVersion\022?.google.cloud.net" + + "workservices.v1.CreateWasmPluginVersionR" + + "equest\032\035.google.longrunning.Operation\"\324\001" + + "\312AF\n\021WasmPluginVersion\0221google.cloud.net" + + "workservices.v1.OperationMetadata\332A1pare" + + "nt,wasm_plugin_version,wasm_plugin_versi" + + "on_id\202\323\344\223\002Q\":/v1/{parent=projects/*/loca" + + "tions/*/wasmPlugins/*}/versions:\023wasm_pl" + + "ugin_version\022\222\002\n\027DeleteWasmPluginVersion" + + "\022?.google.cloud.networkservices.v1.Delet" + + "eWasmPluginVersionRequest\032\035.google.longr" + + "unning.Operation\"\226\001\312AJ\n\025google.protobuf." + + "Empty\0221google.cloud.networkservices.v1.O" + + "perationMetadata\332A\004name\202\323\344\223\002<*:/v1/{name" + + "=projects/*/locations/*/wasmPlugins/*/ve" + + "rsions/*}\022\306\001\n\017ListWasmPlugins\0227.google.c" + + "loud.networkservices.v1.ListWasmPluginsR" + + "equest\0328.google.cloud.networkservices.v1" + + ".ListWasmPluginsResponse\"@\332A\006parent\202\323\344\223\002" + + "1\022//v1/{parent=projects/*/locations/*}/w" + + "asmPlugins\022\263\001\n\rGetWasmPlugin\0225.google.cl" + + "oud.networkservices.v1.GetWasmPluginRequ" + + "est\032+.google.cloud.networkservices.v1.Wa" + + "smPlugin\">\332A\004name\202\323\344\223\0021\022//v1/{name=proje" + + "cts/*/locations/*/wasmPlugins/*}\022\230\002\n\020Cre" + + "ateWasmPlugin\0228.google.cloud.networkserv" + + "ices.v1.CreateWasmPluginRequest\032\035.google" + + ".longrunning.Operation\"\252\001\312A?\n\nWasmPlugin" + + "\0221google.cloud.networkservices.v1.Operat" + + "ionMetadata\332A!parent,wasm_plugin,wasm_pl" + + "ugin_id\202\323\344\223\002>\"//v1/{parent=projects/*/lo" + + "cations/*}/wasmPlugins:\013wasm_plugin\022\232\002\n\020" + + "UpdateWasmPlugin\0228.google.cloud.networks" + + "ervices.v1.UpdateWasmPluginRequest\032\035.goo" + + "gle.longrunning.Operation\"\254\001\312A?\n\nWasmPlu" + + "gin\0221google.cloud.networkservices.v1.Ope" + + "rationMetadata\332A\027wasm_plugin,update_mask" + + "\202\323\344\223\002J2;/v1/{wasm_plugin.name=projects/*" + + "/locations/*/wasmPlugins/*}:\013wasm_plugin" + + "\022\371\001\n\020DeleteWasmPlugin\0228.google.cloud.net" + + "workservices.v1.DeleteWasmPluginRequest\032" + + "\035.google.longrunning.Operation\"\213\001\312AJ\n\025go" + + "ogle.protobuf.Empty\0221google.cloud.networ" + + "kservices.v1.OperationMetadata\332A\004name\202\323\344" + + "\223\0021*//v1/{name=projects/*/locations/*/wa" + + "smPlugins/*}\022\272\001\n\014ListGateways\0224.google.c" + + "loud.networkservices.v1.ListGatewaysRequ" + + "est\0325.google.cloud.networkservices.v1.Li" + + "stGatewaysResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1" + + "/{parent=projects/*/locations/*}/gateway" + + "s\022\247\001\n\nGetGateway\0222.google.cloud.networks" + + "ervices.v1.GetGatewayRequest\032(.google.cl" + + "oud.networkservices.v1.Gateway\";\332A\004name\202" + + "\323\344\223\002.\022,/v1/{name=projects/*/locations/*/" + + "gateways/*}\022\200\002\n\rCreateGateway\0225.google.c" + + "loud.networkservices.v1.CreateGatewayReq" + + "uest\032\035.google.longrunning.Operation\"\230\001\312A" + + "<\n\007Gateway\0221google.cloud.networkservices" + + ".v1.OperationMetadata\332A\031parent,gateway,g" + + "ateway_id\202\323\344\223\0027\",/v1/{parent=projects/*/" + + "locations/*}/gateways:\007gateway\022\202\002\n\rUpdat" + + "eGateway\0225.google.cloud.networkservices." + + "v1.UpdateGatewayRequest\032\035.google.longrun" + + "ning.Operation\"\232\001\312A<\n\007Gateway\0221google.cl" + + "oud.networkservices.v1.OperationMetadata" + + "\332A\023gateway,update_mask\202\323\344\223\002?24/v1/{gatew" + + "ay.name=projects/*/locations/*/gateways/" + + "*}:\007gateway\022\360\001\n\rDeleteGateway\0225.google.c" + + "loud.networkservices.v1.DeleteGatewayReq" + + "uest\032\035.google.longrunning.Operation\"\210\001\312A" + "J\n\025google.protobuf.Empty\0221google.cloud.n" + "etworkservices.v1.OperationMetadata\332A\004na" - + "me\202\323\344\223\002/*-/v1/{name=projects/*/locations" - + "/*/tcpRoutes/*}\022\276\001\n\rListTlsRoutes\0225.goog" - + "le.cloud.networkservices.v1.ListTlsRoute" - + "sRequest\0326.google.cloud.networkservices." - + "v1.ListTlsRoutesResponse\">\332A\006parent\202\323\344\223\002" - + "/\022-/v1/{parent=projects/*/locations/*}/t" - + "lsRoutes\022\253\001\n\013GetTlsRoute\0223.google.cloud." - + "networkservices.v1.GetTlsRouteRequest\032)." - + "google.cloud.networkservices.v1.TlsRoute" - + "\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=projects/*/lo" - + "cations/*/tlsRoutes/*}\022\212\002\n\016CreateTlsRout" - + "e\0226.google.cloud.networkservices.v1.Crea" - + "teTlsRouteRequest\032\035.google.longrunning.O" - + "peration\"\240\001\312A=\n\010TlsRoute\0221google.cloud.n" - + "etworkservices.v1.OperationMetadata\332A\035pa" - + "rent,tls_route,tls_route_id\202\323\344\223\002:\"-/v1/{" - + "parent=projects/*/locations/*}/tlsRoutes" - + ":\ttls_route\022\214\002\n\016UpdateTlsRoute\0226.google." - + "cloud.networkservices.v1.UpdateTlsRouteR" - + "equest\032\035.google.longrunning.Operation\"\242\001" - + "\312A=\n\010TlsRoute\0221google.cloud.networkservi" - + "ces.v1.OperationMetadata\332A\025tls_route,upd" - + "ate_mask\202\323\344\223\002D27/v1/{tls_route.name=proj" - + "ects/*/locations/*/tlsRoutes/*}:\ttls_rou" - + "te\022\363\001\n\016DeleteTlsRoute\0226.google.cloud.net" - + "workservices.v1.DeleteTlsRouteRequest\032\035." - + "google.longrunning.Operation\"\211\001\312AJ\n\025goog" - + "le.protobuf.Empty\0221google.cloud.networks" - + "ervices.v1.OperationMetadata\332A\004name\202\323\344\223\002" - + "/*-/v1/{name=projects/*/locations/*/tlsR" - + "outes/*}\022\326\001\n\023ListServiceBindings\022;.googl" - + "e.cloud.networkservices.v1.ListServiceBi" - + "ndingsRequest\032<.google.cloud.networkserv" - + "ices.v1.ListServiceBindingsResponse\"D\332A\006" - + "parent\202\323\344\223\0025\0223/v1/{parent=projects/*/loc" - + "ations/*}/serviceBindings\022\303\001\n\021GetService" - + "Binding\0229.google.cloud.networkservices.v" - + "1.GetServiceBindingRequest\032/.google.clou" - + "d.networkservices.v1.ServiceBinding\"B\332A\004" - + "name\202\323\344\223\0025\0223/v1/{name=projects/*/locatio" - + "ns/*/serviceBindings/*}\022\264\002\n\024CreateServic" - + "eBinding\022<.google.cloud.networkservices." - + "v1.CreateServiceBindingRequest\032\035.google." - + "longrunning.Operation\"\276\001\312AC\n\016ServiceBind" - + "ing\0221google.cloud.networkservices.v1.Ope" - + "rationMetadata\332A)parent,service_binding," - + "service_binding_id\202\323\344\223\002F\"3/v1/{parent=pr" - + "ojects/*/locations/*}/serviceBindings:\017s" - + "ervice_binding\022\266\002\n\024UpdateServiceBinding\022" - + "<.google.cloud.networkservices.v1.Update" - + "ServiceBindingRequest\032\035.google.longrunni" - + "ng.Operation\"\300\001\312AC\n\016ServiceBinding\0221goog" + + "me\202\323\344\223\002.*,/v1/{name=projects/*/locations" + + "/*/gateways/*}\022\302\001\n\016ListGrpcRoutes\0226.goog" + + "le.cloud.networkservices.v1.ListGrpcRout" + + "esRequest\0327.google.cloud.networkservices" + + ".v1.ListGrpcRoutesResponse\"?\332A\006parent\202\323\344" + + "\223\0020\022./v1/{parent=projects/*/locations/*}" + + "/grpcRoutes\022\257\001\n\014GetGrpcRoute\0224.google.cl" + + "oud.networkservices.v1.GetGrpcRouteReque" + + "st\032*.google.cloud.networkservices.v1.Grp" + + "cRoute\"=\332A\004name\202\323\344\223\0020\022./v1/{name=project" + + "s/*/locations/*/grpcRoutes/*}\022\221\002\n\017Create" + + "GrpcRoute\0227.google.cloud.networkservices" + + ".v1.CreateGrpcRouteRequest\032\035.google.long" + + "running.Operation\"\245\001\312A>\n\tGrpcRoute\0221goog" + "le.cloud.networkservices.v1.OperationMet" - + "adata\332A\033service_binding,update_mask\202\323\344\223\002" - + "V2C/v1/{service_binding.name=projects/*/" - + "locations/*/serviceBindings/*}:\017service_" - + "binding\022\205\002\n\024DeleteServiceBinding\022<.googl" - + "e.cloud.networkservices.v1.DeleteService" - + "BindingRequest\032\035.google.longrunning.Oper" - + "ation\"\217\001\312AJ\n\025google.protobuf.Empty\0221goog" - + "le.cloud.networkservices.v1.OperationMet" - + "adata\332A\004name\202\323\344\223\0025*3/v1/{name=projects/*" - + "/locations/*/serviceBindings/*}\022\262\001\n\nList" - + "Meshes\0222.google.cloud.networkservices.v1" - + ".ListMeshesRequest\0323.google.cloud.networ" - + "kservices.v1.ListMeshesResponse\";\332A\006pare" - + "nt\202\323\344\223\002,\022*/v1/{parent=projects/*/locatio" - + "ns/*}/meshes\022\234\001\n\007GetMesh\022/.google.cloud." - + "networkservices.v1.GetMeshRequest\032%.goog" - + "le.cloud.networkservices.v1.Mesh\"9\332A\004nam" - + "e\202\323\344\223\002,\022*/v1/{name=projects/*/locations/" - + "*/meshes/*}\022\354\001\n\nCreateMesh\0222.google.clou" - + "d.networkservices.v1.CreateMeshRequest\032\035" - + ".google.longrunning.Operation\"\212\001\312A9\n\004Mes" - + "h\0221google.cloud.networkservices.v1.Opera" - + "tionMetadata\332A\023parent,mesh,mesh_id\202\323\344\223\0022" - + "\"*/v1/{parent=projects/*/locations/*}/me" - + "shes:\004mesh\022\356\001\n\nUpdateMesh\0222.google.cloud" - + ".networkservices.v1.UpdateMeshRequest\032\035." - + "google.longrunning.Operation\"\214\001\312A9\n\004Mesh" + + "adata\332A\037parent,grpc_route,grpc_route_id\202" + + "\323\344\223\002<\"./v1/{parent=projects/*/locations/" + + "*}/grpcRoutes:\ngrpc_route\022\223\002\n\017UpdateGrpc" + + "Route\0227.google.cloud.networkservices.v1." + + "UpdateGrpcRouteRequest\032\035.google.longrunn" + + "ing.Operation\"\247\001\312A>\n\tGrpcRoute\0221google.c" + + "loud.networkservices.v1.OperationMetadat" + + "a\332A\026grpc_route,update_mask\202\323\344\223\002G29/v1/{g" + + "rpc_route.name=projects/*/locations/*/gr" + + "pcRoutes/*}:\ngrpc_route\022\366\001\n\017DeleteGrpcRo" + + "ute\0227.google.cloud.networkservices.v1.De" + + "leteGrpcRouteRequest\032\035.google.longrunnin" + + "g.Operation\"\212\001\312AJ\n\025google.protobuf.Empty" + "\0221google.cloud.networkservices.v1.Operat" - + "ionMetadata\332A\020mesh,update_mask\202\323\344\223\00272//v" - + "1/{mesh.name=projects/*/locations/*/mesh" - + "es/*}:\004mesh\022\350\001\n\nDeleteMesh\0222.google.clou" - + "d.networkservices.v1.DeleteMeshRequest\032\035" - + ".google.longrunning.Operation\"\206\001\312AJ\n\025goo" + + "ionMetadata\332A\004name\202\323\344\223\0020*./v1/{name=proj" + + "ects/*/locations/*/grpcRoutes/*}\022\302\001\n\016Lis" + + "tHttpRoutes\0226.google.cloud.networkservic" + + "es.v1.ListHttpRoutesRequest\0327.google.clo" + + "ud.networkservices.v1.ListHttpRoutesResp" + + "onse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=proje" + + "cts/*/locations/*}/httpRoutes\022\257\001\n\014GetHtt" + + "pRoute\0224.google.cloud.networkservices.v1" + + ".GetHttpRouteRequest\032*.google.cloud.netw" + + "orkservices.v1.HttpRoute\"=\332A\004name\202\323\344\223\0020\022" + + "./v1/{name=projects/*/locations/*/httpRo" + + "utes/*}\022\221\002\n\017CreateHttpRoute\0227.google.clo" + + "ud.networkservices.v1.CreateHttpRouteReq" + + "uest\032\035.google.longrunning.Operation\"\245\001\312A" + + ">\n\tHttpRoute\0221google.cloud.networkservic" + + "es.v1.OperationMetadata\332A\037parent,http_ro" + + "ute,http_route_id\202\323\344\223\002<\"./v1/{parent=pro" + + "jects/*/locations/*}/httpRoutes:\nhttp_ro" + + "ute\022\223\002\n\017UpdateHttpRoute\0227.google.cloud.n" + + "etworkservices.v1.UpdateHttpRouteRequest" + + "\032\035.google.longrunning.Operation\"\247\001\312A>\n\tH" + + "ttpRoute\0221google.cloud.networkservices.v" + + "1.OperationMetadata\332A\026http_route,update_" + + "mask\202\323\344\223\002G29/v1/{http_route.name=project" + + "s/*/locations/*/httpRoutes/*}:\nhttp_rout" + + "e\022\366\001\n\017DeleteHttpRoute\0227.google.cloud.net" + + "workservices.v1.DeleteHttpRouteRequest\032\035" + + ".google.longrunning.Operation\"\212\001\312AJ\n\025goo" + "gle.protobuf.Empty\0221google.cloud.network" + "services.v1.OperationMetadata\332A\004name\202\323\344\223" - + "\002,**/v1/{name=projects/*/locations/*/mes" - + "hes/*}\022\336\001\n\025ListServiceLbPolicies\022=.googl" - + "e.cloud.networkservices.v1.ListServiceLb" - + "PoliciesRequest\032>.google.cloud.networkse" - + "rvices.v1.ListServiceLbPoliciesResponse\"" - + "F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=projects/*" - + "/locations/*}/serviceLbPolicies\022\310\001\n\022GetS" - + "erviceLbPolicy\022:.google.cloud.networkser" - + "vices.v1.GetServiceLbPolicyRequest\0320.goo" - + "gle.cloud.networkservices.v1.ServiceLbPo" - + "licy\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=projects/" - + "*/locations/*/serviceLbPolicies/*}\022\277\002\n\025C" - + "reateServiceLbPolicy\022=.google.cloud.netw" - + "orkservices.v1.CreateServiceLbPolicyRequ" - + "est\032\035.google.longrunning.Operation\"\307\001\312AD" - + "\n\017ServiceLbPolicy\0221google.cloud.networks" - + "ervices.v1.OperationMetadata\332A-parent,se" - + "rvice_lb_policy,service_lb_policy_id\202\323\344\223" - + "\002J\"5/v1/{parent=projects/*/locations/*}/" - + "serviceLbPolicies:\021service_lb_policy\022\301\002\n" - + "\025UpdateServiceLbPolicy\022=.google.cloud.ne" - + "tworkservices.v1.UpdateServiceLbPolicyRe" - + "quest\032\035.google.longrunning.Operation\"\311\001\312" - + "AD\n\017ServiceLbPolicy\0221google.cloud.networ" - + "kservices.v1.OperationMetadata\332A\035service" - + "_lb_policy,update_mask\202\323\344\223\002\\2G/v1/{servi" - + "ce_lb_policy.name=projects/*/locations/*" - + "/serviceLbPolicies/*}:\021service_lb_policy" - + "\022\211\002\n\025DeleteServiceLbPolicy\022=.google.clou" - + "d.networkservices.v1.DeleteServiceLbPoli" - + "cyRequest\032\035.google.longrunning.Operation" - + "\"\221\001\312AJ\n\025google.protobuf.Empty\0221google.cl" + + "\0020*./v1/{name=projects/*/locations/*/htt" + + "pRoutes/*}\022\276\001\n\rListTcpRoutes\0225.google.cl" + + "oud.networkservices.v1.ListTcpRoutesRequ" + + "est\0326.google.cloud.networkservices.v1.Li" + + "stTcpRoutesResponse\">\332A\006parent\202\323\344\223\002/\022-/v" + + "1/{parent=projects/*/locations/*}/tcpRou" + + "tes\022\253\001\n\013GetTcpRoute\0223.google.cloud.netwo" + + "rkservices.v1.GetTcpRouteRequest\032).googl" + + "e.cloud.networkservices.v1.TcpRoute\"<\332A\004" + + "name\202\323\344\223\002/\022-/v1/{name=projects/*/locatio" + + "ns/*/tcpRoutes/*}\022\212\002\n\016CreateTcpRoute\0226.g" + + "oogle.cloud.networkservices.v1.CreateTcp" + + "RouteRequest\032\035.google.longrunning.Operat" + + "ion\"\240\001\312A=\n\010TcpRoute\0221google.cloud.networ" + + "kservices.v1.OperationMetadata\332A\035parent," + + "tcp_route,tcp_route_id\202\323\344\223\002:\"-/v1/{paren" + + "t=projects/*/locations/*}/tcpRoutes:\ttcp" + + "_route\022\214\002\n\016UpdateTcpRoute\0226.google.cloud" + + ".networkservices.v1.UpdateTcpRouteReques" + + "t\032\035.google.longrunning.Operation\"\242\001\312A=\n\010" + + "TcpRoute\0221google.cloud.networkservices.v" + + "1.OperationMetadata\332A\025tcp_route,update_m" + + "ask\202\323\344\223\002D27/v1/{tcp_route.name=projects/" + + "*/locations/*/tcpRoutes/*}:\ttcp_route\022\363\001" + + "\n\016DeleteTcpRoute\0226.google.cloud.networks" + + "ervices.v1.DeleteTcpRouteRequest\032\035.googl" + + "e.longrunning.Operation\"\211\001\312AJ\n\025google.pr" + + "otobuf.Empty\0221google.cloud.networkservic" + + "es.v1.OperationMetadata\332A\004name\202\323\344\223\002/*-/v" + + "1/{name=projects/*/locations/*/tcpRoutes" + + "/*}\022\276\001\n\rListTlsRoutes\0225.google.cloud.net" + + "workservices.v1.ListTlsRoutesRequest\0326.g" + + "oogle.cloud.networkservices.v1.ListTlsRo" + + "utesResponse\">\332A\006parent\202\323\344\223\002/\022-/v1/{pare" + + "nt=projects/*/locations/*}/tlsRoutes\022\253\001\n" + + "\013GetTlsRoute\0223.google.cloud.networkservi" + + "ces.v1.GetTlsRouteRequest\032).google.cloud" + + ".networkservices.v1.TlsRoute\"<\332A\004name\202\323\344" + + "\223\002/\022-/v1/{name=projects/*/locations/*/tl" + + "sRoutes/*}\022\212\002\n\016CreateTlsRoute\0226.google.c" + + "loud.networkservices.v1.CreateTlsRouteRe" + + "quest\032\035.google.longrunning.Operation\"\240\001\312" + + "A=\n\010TlsRoute\0221google.cloud.networkservic" + + "es.v1.OperationMetadata\332A\035parent,tls_rou" + + "te,tls_route_id\202\323\344\223\002:\"-/v1/{parent=proje" + + "cts/*/locations/*}/tlsRoutes:\ttls_route\022" + + "\214\002\n\016UpdateTlsRoute\0226.google.cloud.networ" + + "kservices.v1.UpdateTlsRouteRequest\032\035.goo" + + "gle.longrunning.Operation\"\242\001\312A=\n\010TlsRout" + + "e\0221google.cloud.networkservices.v1.Opera" + + "tionMetadata\332A\025tls_route,update_mask\202\323\344\223" + + "\002D27/v1/{tls_route.name=projects/*/locat" + + "ions/*/tlsRoutes/*}:\ttls_route\022\363\001\n\016Delet" + + "eTlsRoute\0226.google.cloud.networkservices" + + ".v1.DeleteTlsRouteRequest\032\035.google.longr" + + "unning.Operation\"\211\001\312AJ\n\025google.protobuf." + + "Empty\0221google.cloud.networkservices.v1.O" + + "perationMetadata\332A\004name\202\323\344\223\002/*-/v1/{name" + + "=projects/*/locations/*/tlsRoutes/*}\022\326\001\n" + + "\023ListServiceBindings\022;.google.cloud.netw" + + "orkservices.v1.ListServiceBindingsReques" + + "t\032<.google.cloud.networkservices.v1.List" + + "ServiceBindingsResponse\"D\332A\006parent\202\323\344\223\0025" + + "\0223/v1/{parent=projects/*/locations/*}/se" + + "rviceBindings\022\303\001\n\021GetServiceBinding\0229.go" + + "ogle.cloud.networkservices.v1.GetService" + + "BindingRequest\032/.google.cloud.networkser" + + "vices.v1.ServiceBinding\"B\332A\004name\202\323\344\223\0025\0223" + + "/v1/{name=projects/*/locations/*/service" + + "Bindings/*}\022\264\002\n\024CreateServiceBinding\022<.g" + + "oogle.cloud.networkservices.v1.CreateSer" + + "viceBindingRequest\032\035.google.longrunning." + + "Operation\"\276\001\312AC\n\016ServiceBinding\0221google." + + "cloud.networkservices.v1.OperationMetada" + + "ta\332A)parent,service_binding,service_bind" + + "ing_id\202\323\344\223\002F\"3/v1/{parent=projects/*/loc" + + "ations/*}/serviceBindings:\017service_bindi" + + "ng\022\266\002\n\024UpdateServiceBinding\022<.google.clo" + + "ud.networkservices.v1.UpdateServiceBindi" + + "ngRequest\032\035.google.longrunning.Operation" + + "\"\300\001\312AC\n\016ServiceBinding\0221google.cloud.net" + + "workservices.v1.OperationMetadata\332A\033serv" + + "ice_binding,update_mask\202\323\344\223\002V2C/v1/{serv" + + "ice_binding.name=projects/*/locations/*/" + + "serviceBindings/*}:\017service_binding\022\205\002\n\024" + + "DeleteServiceBinding\022<.google.cloud.netw" + + "orkservices.v1.DeleteServiceBindingReque" + + "st\032\035.google.longrunning.Operation\"\217\001\312AJ\n" + + "\025google.protobuf.Empty\0221google.cloud.net" + + "workservices.v1.OperationMetadata\332A\004name" + + "\202\323\344\223\0025*3/v1/{name=projects/*/locations/*" + + "/serviceBindings/*}\022\262\001\n\nListMeshes\0222.goo" + + "gle.cloud.networkservices.v1.ListMeshesR" + + "equest\0323.google.cloud.networkservices.v1" + + ".ListMeshesResponse\";\332A\006parent\202\323\344\223\002,\022*/v" + + "1/{parent=projects/*/locations/*}/meshes" + + "\022\234\001\n\007GetMesh\022/.google.cloud.networkservi" + + "ces.v1.GetMeshRequest\032%.google.cloud.net" + + "workservices.v1.Mesh\"9\332A\004name\202\323\344\223\002,\022*/v1" + + "/{name=projects/*/locations/*/meshes/*}\022" + + "\354\001\n\nCreateMesh\0222.google.cloud.networkser" + + "vices.v1.CreateMeshRequest\032\035.google.long" + + "running.Operation\"\212\001\312A9\n\004Mesh\0221google.cl" + "oud.networkservices.v1.OperationMetadata" - + "\332A\004name\202\323\344\223\0027*5/v1/{name=projects/*/loca" - + "tions/*/serviceLbPolicies/*}\022\317\001\n\023GetGate" - + "wayRouteView\022;.google.cloud.networkservi" - + "ces.v1.GetGatewayRouteViewRequest\0321.goog" - + "le.cloud.networkservices.v1.GatewayRoute" - + "View\"H\332A\004name\202\323\344\223\002;\0229/v1/{name=projects/" - + "*/locations/*/gateways/*/routeViews/*}\022\304" - + "\001\n\020GetMeshRouteView\0228.google.cloud.netwo" - + "rkservices.v1.GetMeshRouteViewRequest\032.." - + "google.cloud.networkservices.v1.MeshRout" - + "eView\"F\332A\004name\202\323\344\223\0029\0227/v1/{name=projects" - + "/*/locations/*/meshes/*/routeViews/*}\022\342\001" - + "\n\025ListGatewayRouteViews\022=.google.cloud.n" - + "etworkservices.v1.ListGatewayRouteViewsR" - + "equest\032>.google.cloud.networkservices.v1" - + ".ListGatewayRouteViewsResponse\"J\332A\006paren" - + "t\202\323\344\223\002;\0229/v1/{parent=projects/*/location" - + "s/*/gateways/*}/routeViews\022\327\001\n\022ListMeshR" - + "outeViews\022:.google.cloud.networkservices" - + ".v1.ListMeshRouteViewsRequest\032;.google.c" - + "loud.networkservices.v1.ListMeshRouteVie" - + "wsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v1/{parent" - + "=projects/*/locations/*/meshes/*}/routeV" - + "iews\032R\312A\036networkservices.googleapis.com\322" - + "A.https://www.googleapis.com/auth/cloud-" - + "platformB\337\001\n#com.google.cloud.networkser" - + "vices.v1P\001ZMcloud.google.com/go/networks" - + "ervices/apiv1/networkservicespb;networks" - + "ervicespb\252\002\037Google.Cloud.NetworkServices" - + ".V1\312\002\037Google\\Cloud\\NetworkServices\\V1\352\002\"" - + "Google::Cloud::NetworkServices::V1b\006prot" - + "o3" + + "\332A\023parent,mesh,mesh_id\202\323\344\223\0022\"*/v1/{paren" + + "t=projects/*/locations/*}/meshes:\004mesh\022\356" + + "\001\n\nUpdateMesh\0222.google.cloud.networkserv" + + "ices.v1.UpdateMeshRequest\032\035.google.longr" + + "unning.Operation\"\214\001\312A9\n\004Mesh\0221google.clo" + + "ud.networkservices.v1.OperationMetadata\332" + + "A\020mesh,update_mask\202\323\344\223\00272//v1/{mesh.name" + + "=projects/*/locations/*/meshes/*}:\004mesh\022" + + "\350\001\n\nDeleteMesh\0222.google.cloud.networkser" + + "vices.v1.DeleteMeshRequest\032\035.google.long" + + "running.Operation\"\206\001\312AJ\n\025google.protobuf" + + ".Empty\0221google.cloud.networkservices.v1." + + "OperationMetadata\332A\004name\202\323\344\223\002,**/v1/{nam" + + "e=projects/*/locations/*/meshes/*}\022\336\001\n\025L" + + "istServiceLbPolicies\022=.google.cloud.netw" + + "orkservices.v1.ListServiceLbPoliciesRequ" + + "est\032>.google.cloud.networkservices.v1.Li" + + "stServiceLbPoliciesResponse\"F\332A\006parent\202\323" + + "\344\223\0027\0225/v1/{parent=projects/*/locations/*" + + "}/serviceLbPolicies\022\310\001\n\022GetServiceLbPoli" + + "cy\022:.google.cloud.networkservices.v1.Get" + + "ServiceLbPolicyRequest\0320.google.cloud.ne" + + "tworkservices.v1.ServiceLbPolicy\"D\332A\004nam" + + "e\202\323\344\223\0027\0225/v1/{name=projects/*/locations/" + + "*/serviceLbPolicies/*}\022\277\002\n\025CreateService" + + "LbPolicy\022=.google.cloud.networkservices." + + "v1.CreateServiceLbPolicyRequest\032\035.google" + + ".longrunning.Operation\"\307\001\312AD\n\017ServiceLbP" + + "olicy\0221google.cloud.networkservices.v1.O" + + "perationMetadata\332A-parent,service_lb_pol" + + "icy,service_lb_policy_id\202\323\344\223\002J\"5/v1/{par" + + "ent=projects/*/locations/*}/serviceLbPol" + + "icies:\021service_lb_policy\022\301\002\n\025UpdateServi" + + "ceLbPolicy\022=.google.cloud.networkservice" + + "s.v1.UpdateServiceLbPolicyRequest\032\035.goog" + + "le.longrunning.Operation\"\311\001\312AD\n\017ServiceL" + + "bPolicy\0221google.cloud.networkservices.v1" + + ".OperationMetadata\332A\035service_lb_policy,u" + + "pdate_mask\202\323\344\223\002\\2G/v1/{service_lb_policy" + + ".name=projects/*/locations/*/serviceLbPo" + + "licies/*}:\021service_lb_policy\022\211\002\n\025DeleteS" + + "erviceLbPolicy\022=.google.cloud.networkser" + + "vices.v1.DeleteServiceLbPolicyRequest\032\035." + + "google.longrunning.Operation\"\221\001\312AJ\n\025goog" + + "le.protobuf.Empty\0221google.cloud.networks" + + "ervices.v1.OperationMetadata\332A\004name\202\323\344\223\002" + + "7*5/v1/{name=projects/*/locations/*/serv" + + "iceLbPolicies/*}\022\317\001\n\023GetGatewayRouteView" + + "\022;.google.cloud.networkservices.v1.GetGa" + + "tewayRouteViewRequest\0321.google.cloud.net" + + "workservices.v1.GatewayRouteView\"H\332A\004nam" + + "e\202\323\344\223\002;\0229/v1/{name=projects/*/locations/" + + "*/gateways/*/routeViews/*}\022\304\001\n\020GetMeshRo" + + "uteView\0228.google.cloud.networkservices.v" + + "1.GetMeshRouteViewRequest\032..google.cloud" + + ".networkservices.v1.MeshRouteView\"F\332A\004na" + + "me\202\323\344\223\0029\0227/v1/{name=projects/*/locations" + + "/*/meshes/*/routeViews/*}\022\342\001\n\025ListGatewa" + + "yRouteViews\022=.google.cloud.networkservic" + + "es.v1.ListGatewayRouteViewsRequest\032>.goo" + + "gle.cloud.networkservices.v1.ListGateway" + + "RouteViewsResponse\"J\332A\006parent\202\323\344\223\002;\0229/v1" + + "/{parent=projects/*/locations/*/gateways" + + "/*}/routeViews\022\327\001\n\022ListMeshRouteViews\022:." + + "google.cloud.networkservices.v1.ListMesh" + + "RouteViewsRequest\032;.google.cloud.network" + + "services.v1.ListMeshRouteViewsResponse\"H" + + "\332A\006parent\202\323\344\223\0029\0227/v1/{parent=projects/*/" + + "locations/*/meshes/*}/routeViews\032R\312A\036net" + + "workservices.googleapis.com\322A.https://ww" + + "w.googleapis.com/auth/cloud-platformB\337\001\n" + + "#com.google.cloud.networkservices.v1P\001ZM" + + "cloud.google.com/go/networkservices/apiv" + + "1/networkservicespb;networkservicespb\252\002\037" + + "Google.Cloud.NetworkServices.V1\312\002\037Google" + + "\\Cloud\\NetworkServices\\V1\352\002\"Google::Clou" + + "d::NetworkServices::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -364,6 +422,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.cloud.networkservices.v1.CommonProto.getDescriptor(), com.google.cloud.networkservices.v1.EndpointPolicyProto.getDescriptor(), + com.google.cloud.networkservices.v1.ExtensibilityProto.getDescriptor(), com.google.cloud.networkservices.v1.GatewayProto.getDescriptor(), com.google.cloud.networkservices.v1.GrpcRouteProto.getDescriptor(), com.google.cloud.networkservices.v1.HttpRouteProto.getDescriptor(), @@ -374,6 +433,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.networkservices.v1.TcpRouteProto.getDescriptor(), com.google.cloud.networkservices.v1.TlsRouteProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); @@ -388,6 +448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.cloud.networkservices.v1.CommonProto.getDescriptor(); com.google.cloud.networkservices.v1.EndpointPolicyProto.getDescriptor(); + com.google.cloud.networkservices.v1.ExtensibilityProto.getDescriptor(); com.google.cloud.networkservices.v1.GatewayProto.getDescriptor(); com.google.cloud.networkservices.v1.GrpcRouteProto.getDescriptor(); com.google.cloud.networkservices.v1.HttpRouteProto.getDescriptor(); @@ -398,6 +459,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.networkservices.v1.TcpRouteProto.getDescriptor(); com.google.cloud.networkservices.v1.TlsRouteProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequest.java new file mode 100644 index 000000000000..0584c14dfc14 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequest.java @@ -0,0 +1,1388 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Message for updating a `AuthzExtension` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateAuthzExtensionRequest} + */ +public final class UpdateAuthzExtensionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) + UpdateAuthzExtensionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateAuthzExtensionRequest.newBuilder() to construct. + private UpdateAuthzExtensionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAuthzExtensionRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAuthzExtensionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int AUTHZ_EXTENSION_FIELD_NUMBER = 2; + private com.google.cloud.networkservices.v1.AuthzExtension authzExtension_; + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + @java.lang.Override + public boolean hasAuthzExtension() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension() { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionOrBuilder() { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAuthzExtension()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAuthzExtension()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.networkservices.v1.UpdateAuthzExtensionRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest other = + (com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasAuthzExtension() != other.hasAuthzExtension()) return false; + if (hasAuthzExtension()) { + if (!getAuthzExtension().equals(other.getAuthzExtension())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasAuthzExtension()) { + hash = (37 * hash) + AUTHZ_EXTENSION_FIELD_NUMBER; + hash = (53 * hash) + getAuthzExtension().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest 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.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + 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.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + java.io.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.networkservices.v1.UpdateAuthzExtensionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseDelimitedFrom( + java.io.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.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.UpdateAuthzExtensionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Message for updating a `AuthzExtension` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateAuthzExtensionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.class, + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateMaskFieldBuilder(); + getAuthzExtensionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + authzExtension_ = null; + if (authzExtensionBuilder_ != null) { + authzExtensionBuilder_.dispose(); + authzExtensionBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.DepProto + .internal_static_google_cloud_networkservices_v1_UpdateAuthzExtensionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest build() { + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest buildPartial() { + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest result = + new com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authzExtension_ = + authzExtensionBuilder_ == null ? authzExtension_ : authzExtensionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.networkservices.v1.UpdateAuthzExtensionRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest other) { + if (other + == com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasAuthzExtension()) { + mergeAuthzExtension(other.getAuthzExtension()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getAuthzExtensionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. Used to specify the fields to be overwritten in the
+     * `AuthzExtension` resource by the update.
+     * The fields specified in the `update_mask` are relative to the resource, not
+     * the full request. A field is overwritten if it is in the mask. If the
+     * user does not specify a mask, then all fields are overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkservices.v1.AuthzExtension authzExtension_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + authzExtensionBuilder_; + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + public boolean hasAuthzExtension() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + public com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension() { + if (authzExtensionBuilder_ == null) { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } else { + return authzExtensionBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthzExtension(com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authzExtension_ = value; + } else { + authzExtensionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAuthzExtension( + com.google.cloud.networkservices.v1.AuthzExtension.Builder builderForValue) { + if (authzExtensionBuilder_ == null) { + authzExtension_ = builderForValue.build(); + } else { + authzExtensionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAuthzExtension(com.google.cloud.networkservices.v1.AuthzExtension value) { + if (authzExtensionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && authzExtension_ != null + && authzExtension_ + != com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance()) { + getAuthzExtensionBuilder().mergeFrom(value); + } else { + authzExtension_ = value; + } + } else { + authzExtensionBuilder_.mergeFrom(value); + } + if (authzExtension_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAuthzExtension() { + bitField0_ = (bitField0_ & ~0x00000002); + authzExtension_ = null; + if (authzExtensionBuilder_ != null) { + authzExtensionBuilder_.dispose(); + authzExtensionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AuthzExtension.Builder getAuthzExtensionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthzExtensionFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder + getAuthzExtensionOrBuilder() { + if (authzExtensionBuilder_ != null) { + return authzExtensionBuilder_.getMessageOrBuilder(); + } else { + return authzExtension_ == null + ? com.google.cloud.networkservices.v1.AuthzExtension.getDefaultInstance() + : authzExtension_; + } + } + + /** + * + * + *
+     * Required. `AuthzExtension` resource being updated.
+     * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder> + getAuthzExtensionFieldBuilder() { + if (authzExtensionBuilder_ == null) { + authzExtensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.AuthzExtension, + com.google.cloud.networkservices.v1.AuthzExtension.Builder, + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder>( + getAuthzExtension(), getParentForChildren(), isClean()); + authzExtension_ = null; + } + return authzExtensionBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique
+     * request ID so that if you must retry your request, the server can ignore
+     * the request if it has already been completed. The server guarantees
+     * that for 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request
+     * ID, the server ignores the second request This prevents
+     * clients from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.networkservices.v1.UpdateAuthzExtensionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) + private static final com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest(); + } + + public static com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAuthzExtensionRequest 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.networkservices.v1.UpdateAuthzExtensionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequestOrBuilder.java new file mode 100644 index 000000000000..6a74b23729bb --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAuthzExtensionRequestOrBuilder.java @@ -0,0 +1,173 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface UpdateAuthzExtensionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.UpdateAuthzExtensionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. Used to specify the fields to be overwritten in the
+   * `AuthzExtension` resource by the update.
+   * The fields specified in the `update_mask` are relative to the resource, not
+   * the full request. A field is overwritten if it is in the mask. If the
+   * user does not specify a mask, then all fields are overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the authzExtension field is set. + */ + boolean hasAuthzExtension(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The authzExtension. + */ + com.google.cloud.networkservices.v1.AuthzExtension getAuthzExtension(); + + /** + * + * + *
+   * Required. `AuthzExtension` resource being updated.
+   * 
+ * + * + * .google.cloud.networkservices.v1.AuthzExtension authz_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.AuthzExtensionOrBuilder getAuthzExtensionOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique
+   * request ID so that if you must retry your request, the server can ignore
+   * the request if it has already been completed. The server guarantees
+   * that for 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request
+   * ID, the server ignores the second request This prevents
+   * clients from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequest.java index 86e1c934e563..5aee6381d2d3 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequest.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -95,7 +95,7 @@ public boolean hasUpdateMask() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -116,7 +116,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -201,12 +201,11 @@ public com.google.cloud.networkservices.v1.LbRouteExtension getLbRouteExtension( * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -239,12 +238,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -711,7 +709,7 @@ public Builder mergeFrom( *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -731,7 +729,7 @@ public boolean hasUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -757,7 +755,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -785,7 +783,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -810,7 +808,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -843,7 +841,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -868,7 +866,7 @@ public Builder clearUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -888,7 +886,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -912,7 +910,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbRouteExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -1163,12 +1161,11 @@ public Builder clearLbRouteExtension() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1200,12 +1197,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1237,12 +1233,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1273,12 +1268,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1305,12 +1299,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequestOrBuilder.java index 6f270875ddcb..a4eea0626c6c 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbRouteExtensionRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface UpdateLbRouteExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -48,7 +48,7 @@ public interface UpdateLbRouteExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -66,7 +66,7 @@ public interface UpdateLbRouteExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbRouteExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -126,12 +126,11 @@ public interface UpdateLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -153,12 +152,11 @@ public interface UpdateLbRouteExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequest.java index 68d78335ab86..0a662bc4f664 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequest.java @@ -75,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -96,7 +96,7 @@ public boolean hasUpdateMask() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -117,7 +117,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -202,12 +202,11 @@ public com.google.cloud.networkservices.v1.LbTrafficExtension getLbTrafficExtens * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -240,12 +239,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -716,7 +714,7 @@ public Builder mergeFrom( *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -736,7 +734,7 @@ public boolean hasUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -762,7 +760,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -790,7 +788,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -815,7 +813,7 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -848,7 +846,7 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -873,7 +871,7 @@ public Builder clearUpdateMask() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -893,7 +891,7 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -917,7 +915,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { *
      * Optional. Used to specify the fields to be overwritten in the
      * `LbTrafficExtension` resource by the update.
-     * The fields specified in the update_mask are relative to the resource, not
+     * The fields specified in the `update_mask` are relative to the resource, not
      * the full request. A field is overwritten if it is in the mask. If the
      * user does not specify a mask, then all fields are overwritten.
      * 
@@ -1169,12 +1167,11 @@ public Builder clearLbTrafficExtension() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1206,12 +1203,11 @@ public java.lang.String getRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1243,12 +1239,11 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1279,12 +1274,11 @@ public Builder setRequestId(java.lang.String value) { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -1311,12 +1305,11 @@ public Builder clearRequestId() { * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequestOrBuilder.java index 868d1705507c..e3fbb4d0478e 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateLbTrafficExtensionRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface UpdateLbTrafficExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -48,7 +48,7 @@ public interface UpdateLbTrafficExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -66,7 +66,7 @@ public interface UpdateLbTrafficExtensionRequestOrBuilder *
    * Optional. Used to specify the fields to be overwritten in the
    * `LbTrafficExtension` resource by the update.
-   * The fields specified in the update_mask are relative to the resource, not
+   * The fields specified in the `update_mask` are relative to the resource, not
    * the full request. A field is overwritten if it is in the mask. If the
    * user does not specify a mask, then all fields are overwritten.
    * 
@@ -126,12 +126,11 @@ public interface UpdateLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is @@ -153,12 +152,11 @@ public interface UpdateLbTrafficExtensionRequestOrBuilder * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server can ignore * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. + * that for 60 minutes since the first request. * * For example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents + * ID, the server ignores the second request This prevents * clients from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequest.java new file mode 100644 index 000000000000..fa46c50cbc53 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequest.java @@ -0,0 +1,1157 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Request used by the `UpdateWasmPlugin` method.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateWasmPluginRequest} + */ +public final class UpdateWasmPluginRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.UpdateWasmPluginRequest) + UpdateWasmPluginRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateWasmPluginRequest.newBuilder() to construct. + private UpdateWasmPluginRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateWasmPluginRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateWasmPluginRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.class, + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int WASM_PLUGIN_FIELD_NUMBER = 2; + private com.google.cloud.networkservices.v1.WasmPlugin wasmPlugin_; + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + @java.lang.Override + public boolean hasWasmPlugin() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin() { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder() { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getWasmPlugin()); + } + 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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWasmPlugin()); + } + 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.networkservices.v1.UpdateWasmPluginRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest other = + (com.google.cloud.networkservices.v1.UpdateWasmPluginRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasWasmPlugin() != other.hasWasmPlugin()) return false; + if (hasWasmPlugin()) { + if (!getWasmPlugin().equals(other.getWasmPlugin())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasWasmPlugin()) { + hash = (37 * hash) + WASM_PLUGIN_FIELD_NUMBER; + hash = (53 * hash) + getWasmPlugin().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest 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.networkservices.v1.UpdateWasmPluginRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + 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.networkservices.v1.UpdateWasmPluginRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + java.io.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.networkservices.v1.UpdateWasmPluginRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseDelimitedFrom( + java.io.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.networkservices.v1.UpdateWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.UpdateWasmPluginRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request used by the `UpdateWasmPlugin` method.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateWasmPluginRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.UpdateWasmPluginRequest) + com.google.cloud.networkservices.v1.UpdateWasmPluginRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.class, + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateMaskFieldBuilder(); + getWasmPluginFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + wasmPlugin_ = null; + if (wasmPluginBuilder_ != null) { + wasmPluginBuilder_.dispose(); + wasmPluginBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_UpdateWasmPluginRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateWasmPluginRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateWasmPluginRequest build() { + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateWasmPluginRequest buildPartial() { + com.google.cloud.networkservices.v1.UpdateWasmPluginRequest result = + new com.google.cloud.networkservices.v1.UpdateWasmPluginRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.UpdateWasmPluginRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wasmPlugin_ = wasmPluginBuilder_ == null ? wasmPlugin_ : wasmPluginBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + 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.networkservices.v1.UpdateWasmPluginRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.UpdateWasmPluginRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.UpdateWasmPluginRequest other) { + if (other == com.google.cloud.networkservices.v1.UpdateWasmPluginRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasWasmPlugin()) { + mergeWasmPlugin(other.getWasmPlugin()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getWasmPluginFieldBuilder().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 com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Optional. Used to specify the fields to be overwritten in the
+     * `WasmPlugin` resource by the update.
+     * The fields specified in the `update_mask` field are relative to the
+     * resource, not the full request.
+     * An omitted `update_mask` field is treated as an implied `update_mask`
+     * field equivalent to all fields that are populated (that have a non-empty
+     * value).
+     * The `update_mask` field supports a special value `*`, which means that
+     * each field in the given `WasmPlugin` resource (including the empty ones)
+     * replaces the current value.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkservices.v1.WasmPlugin wasmPlugin_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + wasmPluginBuilder_; + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + public boolean hasWasmPlugin() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + public com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin() { + if (wasmPluginBuilder_ == null) { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } else { + return wasmPluginBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPlugin(com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wasmPlugin_ = value; + } else { + wasmPluginBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setWasmPlugin( + com.google.cloud.networkservices.v1.WasmPlugin.Builder builderForValue) { + if (wasmPluginBuilder_ == null) { + wasmPlugin_ = builderForValue.build(); + } else { + wasmPluginBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeWasmPlugin(com.google.cloud.networkservices.v1.WasmPlugin value) { + if (wasmPluginBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wasmPlugin_ != null + && wasmPlugin_ != com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance()) { + getWasmPluginBuilder().mergeFrom(value); + } else { + wasmPlugin_ = value; + } + } else { + wasmPluginBuilder_.mergeFrom(value); + } + if (wasmPlugin_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearWasmPlugin() { + bitField0_ = (bitField0_ & ~0x00000002); + wasmPlugin_ = null; + if (wasmPluginBuilder_ != null) { + wasmPluginBuilder_.dispose(); + wasmPluginBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.Builder getWasmPluginBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWasmPluginFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder() { + if (wasmPluginBuilder_ != null) { + return wasmPluginBuilder_.getMessageOrBuilder(); + } else { + return wasmPlugin_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance() + : wasmPlugin_; + } + } + + /** + * + * + *
+     * Required. Updated `WasmPlugin` resource.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder> + getWasmPluginFieldBuilder() { + if (wasmPluginBuilder_ == null) { + wasmPluginBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin, + com.google.cloud.networkservices.v1.WasmPlugin.Builder, + com.google.cloud.networkservices.v1.WasmPluginOrBuilder>( + getWasmPlugin(), getParentForChildren(), isClean()); + wasmPlugin_ = null; + } + return wasmPluginBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.UpdateWasmPluginRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.UpdateWasmPluginRequest) + private static final com.google.cloud.networkservices.v1.UpdateWasmPluginRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.UpdateWasmPluginRequest(); + } + + public static com.google.cloud.networkservices.v1.UpdateWasmPluginRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateWasmPluginRequest 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.networkservices.v1.UpdateWasmPluginRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequestOrBuilder.java new file mode 100644 index 000000000000..3b7377138739 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateWasmPluginRequestOrBuilder.java @@ -0,0 +1,136 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface UpdateWasmPluginRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.UpdateWasmPluginRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Optional. Used to specify the fields to be overwritten in the
+   * `WasmPlugin` resource by the update.
+   * The fields specified in the `update_mask` field are relative to the
+   * resource, not the full request.
+   * An omitted `update_mask` field is treated as an implied `update_mask`
+   * field equivalent to all fields that are populated (that have a non-empty
+   * value).
+   * The `update_mask` field supports a special value `*`, which means that
+   * each field in the given `WasmPlugin` resource (including the empty ones)
+   * replaces the current value.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the wasmPlugin field is set. + */ + boolean hasWasmPlugin(); + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The wasmPlugin. + */ + com.google.cloud.networkservices.v1.WasmPlugin getWasmPlugin(); + + /** + * + * + *
+   * Required. Updated `WasmPlugin` resource.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin wasm_plugin = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.WasmPluginOrBuilder getWasmPluginOrBuilder(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java new file mode 100644 index 000000000000..f45571376351 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java @@ -0,0 +1,8723 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * `WasmPlugin` is a resource representing a service executing
+ * a customer-provided Wasm module.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin} + */ +public final class WasmPlugin extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.WasmPlugin) + WasmPluginOrBuilder { + private static final long serialVersionUID = 0L; + + // Use WasmPlugin.newBuilder() to construct. + private WasmPlugin(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WasmPlugin() { + name_ = ""; + description_ = ""; + mainVersionId_ = ""; + usedBy_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WasmPlugin(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + case 10: + return internalGetVersions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.class, + com.google.cloud.networkservices.v1.WasmPlugin.Builder.class); + } + + public interface VersionDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.WasmPlugin.VersionDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` version is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 9; + * + * @return Whether the pluginConfigData field is set. + */ + boolean hasPluginConfigData(); + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` version is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 9; + * + * @return The pluginConfigData. + */ + com.google.protobuf.ByteString getPluginConfigData(); + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return Whether the pluginConfigUri field is set. + */ + boolean hasPluginConfigUri(); + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return The pluginConfigUri. + */ + java.lang.String getPluginConfigUri(); + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return The bytes for pluginConfigUri. + */ + com.google.protobuf.ByteString getPluginConfigUriBytes(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+     * Optional. URI of the container image containing the Wasm module, stored
+     * in the Artifact Registry. The container image must contain only a single
+     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+     * is created, the URI gets resolved to an image digest and saved in the
+     * `image_digest` field.
+     * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + + /** + * + * + *
+     * Optional. URI of the container image containing the Wasm module, stored
+     * in the Artifact Registry. The container image must contain only a single
+     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+     * is created, the URI gets resolved to an image digest and saved in the
+     * `image_digest` field.
+     * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in `image`.
+     * The digest is resolved during the creation of a
+     * `WasmPluginVersion` resource.
+     * This field holds the digest value regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + java.lang.String getImageDigest(); + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in `image`.
+     * The digest is resolved during the creation of a
+     * `WasmPluginVersion` resource.
+     * This field holds the digest value regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + com.google.protobuf.ByteString getImageDigestBytes(); + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * the `plugin_config_data` field or the container image defined by the
+     * `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + java.lang.String getPluginConfigDigest(); + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * the `plugin_config_data` field or the container image defined by the
+     * `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + com.google.protobuf.ByteString getPluginConfigDigestBytes(); + + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.PluginConfigSourceCase + getPluginConfigSourceCase(); + } + + /** + * + * + *
+   * Details of a `WasmPluginVersion` resource to be inlined in the
+   * `WasmPlugin` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.VersionDetails} + */ + public static final class VersionDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.WasmPlugin.VersionDetails) + VersionDetailsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use VersionDetails.newBuilder() to construct. + private VersionDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VersionDetails() { + description_ = ""; + imageUri_ = ""; + imageDigest_ = ""; + pluginConfigDigest_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VersionDetails(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.class, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder.class); + } + + private int bitField0_; + private int pluginConfigSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object pluginConfigSource_; + + public enum PluginConfigSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLUGIN_CONFIG_DATA(9), + PLUGIN_CONFIG_URI(10), + PLUGINCONFIGSOURCE_NOT_SET(0); + private final int value; + + private PluginConfigSourceCase(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 PluginConfigSourceCase valueOf(int value) { + return forNumber(value); + } + + public static PluginConfigSourceCase forNumber(int value) { + switch (value) { + case 9: + return PLUGIN_CONFIG_DATA; + case 10: + return PLUGIN_CONFIG_URI; + case 0: + return PLUGINCONFIGSOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PluginConfigSourceCase getPluginConfigSourceCase() { + return PluginConfigSourceCase.forNumber(pluginConfigSourceCase_); + } + + public static final int PLUGIN_CONFIG_DATA_FIELD_NUMBER = 9; + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` version is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 9; + * + * @return Whether the pluginConfigData field is set. + */ + @java.lang.Override + public boolean hasPluginConfigData() { + return pluginConfigSourceCase_ == 9; + } + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` version is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 9; + * + * @return The pluginConfigData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigData() { + if (pluginConfigSourceCase_ == 9) { + return (com.google.protobuf.ByteString) pluginConfigSource_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int PLUGIN_CONFIG_URI_FIELD_NUMBER = 10; + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return Whether the pluginConfigUri field is set. + */ + public boolean hasPluginConfigUri() { + return pluginConfigSourceCase_ == 10; + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return The pluginConfigUri. + */ + public java.lang.String getPluginConfigUri() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 10) { + ref = pluginConfigSource_; + } + if (ref instanceof java.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 (pluginConfigSourceCase_ == 10) { + pluginConfigSource_ = s; + } + return s; + } + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must
+     * contain only a single file with the name
+     * `plugin.config`. When a new `WasmPluginVersion`
+     * resource is created, the digest of the container image is saved in the
+     * `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 10; + * + * @return The bytes for pluginConfigUri. + */ + public com.google.protobuf.ByteString getPluginConfigUriBytes() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 10) { + ref = pluginConfigSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (pluginConfigSourceCase_ == 10) { + pluginConfigSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 = 2; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * 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. A human-readable description of the resource.
+     * 
+ * + * 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 LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageUri_ = ""; + + /** + * + * + *
+     * Optional. URI of the container image containing the Wasm module, stored
+     * in the Artifact Registry. The container image must contain only a single
+     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+     * is created, the URI gets resolved to an image digest and saved in the
+     * `image_digest` field.
+     * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. URI of the container image containing the Wasm module, stored
+     * in the Artifact Registry. The container image must contain only a single
+     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+     * is created, the URI gets resolved to an image digest and saved in the
+     * `image_digest` field.
+     * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_DIGEST_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in `image`.
+     * The digest is resolved during the creation of a
+     * `WasmPluginVersion` resource.
+     * This field holds the digest value regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + @java.lang.Override + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageDigest_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in `image`.
+     * The digest is resolved during the creation of a
+     * `WasmPluginVersion` resource.
+     * This field holds the digest value regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLUGIN_CONFIG_DIGEST_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginConfigDigest_ = ""; + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * the `plugin_config_data` field or the container image defined by the
+     * `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + @java.lang.Override + public java.lang.String getPluginConfigDigest() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginConfigDigest_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * the `plugin_config_data` field or the container image defined by the
+     * `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigDigestBytes() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginConfigDigest_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, imageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, imageDigest_); + } + if (pluginConfigSourceCase_ == 9) { + output.writeBytes(9, (com.google.protobuf.ByteString) pluginConfigSource_); + } + if (pluginConfigSourceCase_ == 10) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, pluginConfigSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginConfigDigest_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, pluginConfigDigest_); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, imageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, imageDigest_); + } + if (pluginConfigSourceCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 9, (com.google.protobuf.ByteString) pluginConfigSource_); + } + if (pluginConfigSourceCase_ == 10) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, pluginConfigSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginConfigDigest_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, pluginConfigDigest_); + } + 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.networkservices.v1.WasmPlugin.VersionDetails)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails other = + (com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getImageDigest().equals(other.getImageDigest())) return false; + if (!getPluginConfigDigest().equals(other.getPluginConfigDigest())) return false; + if (!getPluginConfigSourceCase().equals(other.getPluginConfigSourceCase())) return false; + switch (pluginConfigSourceCase_) { + case 9: + if (!getPluginConfigData().equals(other.getPluginConfigData())) return false; + break; + case 10: + if (!getPluginConfigUri().equals(other.getPluginConfigUri())) 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(); + 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 = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (37 * hash) + IMAGE_DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getImageDigest().hashCode(); + hash = (37 * hash) + PLUGIN_CONFIG_DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigDigest().hashCode(); + switch (pluginConfigSourceCase_) { + case 9: + hash = (37 * hash) + PLUGIN_CONFIG_DATA_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigData().hashCode(); + break; + case 10: + hash = (37 * hash) + PLUGIN_CONFIG_URI_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails 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.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + 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.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + java.io.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.networkservices.v1.WasmPlugin.VersionDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseDelimitedFrom( + java.io.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.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.WasmPlugin.VersionDetails prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Details of a `WasmPluginVersion` resource to be inlined in the
+     * `WasmPlugin` resource.
+     * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.VersionDetails} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.WasmPlugin.VersionDetails) + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.class, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + internalGetMutableLabels().clear(); + imageUri_ = ""; + imageDigest_ = ""; + pluginConfigDigest_ = ""; + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails build() { + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails buildPartial() { + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails result = + new com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = + createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = + updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.imageUri_ = imageUri_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.imageDigest_ = imageDigest_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.pluginConfigDigest_ = pluginConfigDigest_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails result) { + result.pluginConfigSourceCase_ = pluginConfigSourceCase_; + result.pluginConfigSource_ = this.pluginConfigSource_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.WasmPlugin.VersionDetails) { + return mergeFrom((com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails other) { + if (other + == com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getImageDigest().isEmpty()) { + imageDigest_ = other.imageDigest_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getPluginConfigDigest().isEmpty()) { + pluginConfigDigest_ = other.pluginConfigDigest_; + bitField0_ |= 0x00000100; + onChanged(); + } + switch (other.getPluginConfigSourceCase()) { + case PLUGIN_CONFIG_DATA: + { + setPluginConfigData(other.getPluginConfigData()); + break; + } + case PLUGIN_CONFIG_URI: + { + pluginConfigSourceCase_ = 10; + pluginConfigSource_ = other.pluginConfigSource_; + onChanged(); + break; + } + case PLUGINCONFIGSOURCE_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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + imageUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + imageDigest_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 74: + { + pluginConfigSource_ = input.readBytes(); + pluginConfigSourceCase_ = 9; + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + pluginConfigSourceCase_ = 10; + pluginConfigSource_ = s; + break; + } // case 82 + case 90: + { + pluginConfigDigest_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int pluginConfigSourceCase_ = 0; + private java.lang.Object pluginConfigSource_; + + public PluginConfigSourceCase getPluginConfigSourceCase() { + return PluginConfigSourceCase.forNumber(pluginConfigSourceCase_); + } + + public Builder clearPluginConfigSource() { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Configuration for the plugin.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. When a new
+       * `WasmPluginVersion` version is created, the digest of the
+       * contents is saved in the `plugin_config_digest` field.
+       * 
+ * + * bytes plugin_config_data = 9; + * + * @return Whether the pluginConfigData field is set. + */ + public boolean hasPluginConfigData() { + return pluginConfigSourceCase_ == 9; + } + + /** + * + * + *
+       * Configuration for the plugin.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. When a new
+       * `WasmPluginVersion` version is created, the digest of the
+       * contents is saved in the `plugin_config_digest` field.
+       * 
+ * + * bytes plugin_config_data = 9; + * + * @return The pluginConfigData. + */ + public com.google.protobuf.ByteString getPluginConfigData() { + if (pluginConfigSourceCase_ == 9) { + return (com.google.protobuf.ByteString) pluginConfigSource_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + /** + * + * + *
+       * Configuration for the plugin.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. When a new
+       * `WasmPluginVersion` version is created, the digest of the
+       * contents is saved in the `plugin_config_digest` field.
+       * 
+ * + * bytes plugin_config_data = 9; + * + * @param value The pluginConfigData to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigSourceCase_ = 9; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * Configuration for the plugin.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. When a new
+       * `WasmPluginVersion` version is created, the digest of the
+       * contents is saved in the `plugin_config_digest` field.
+       * 
+ * + * bytes plugin_config_data = 9; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigData() { + if (pluginConfigSourceCase_ == 9) { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @return Whether the pluginConfigUri field is set. + */ + @java.lang.Override + public boolean hasPluginConfigUri() { + return pluginConfigSourceCase_ == 10; + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @return The pluginConfigUri. + */ + @java.lang.Override + public java.lang.String getPluginConfigUri() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 10) { + ref = pluginConfigSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (pluginConfigSourceCase_ == 10) { + pluginConfigSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @return The bytes for pluginConfigUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigUriBytes() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 10) { + ref = pluginConfigSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (pluginConfigSourceCase_ == 10) { + pluginConfigSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @param value The pluginConfigUri to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigSourceCase_ = 10; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigUri() { + if (pluginConfigSourceCase_ == 10) { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * URI of the plugin configuration stored in the Artifact Registry.
+       * The configuration is provided to the plugin at runtime through
+       * the `ON_CONFIGURE` callback. The container image must
+       * contain only a single file with the name
+       * `plugin.config`. When a new `WasmPluginVersion`
+       * resource is created, the digest of the container image is saved in the
+       * `plugin_config_digest` field.
+       * 
+ * + * string plugin_config_uri = 10; + * + * @param value The bytes for pluginConfigUri to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginConfigSourceCase_ = 10; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 timestamp when the resource was created.
+       * 
+ * + * + * .google.protobuf.Timestamp create_time = 1 [(.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 timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.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 timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. The timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.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 timestamp when the resource was updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+       * Optional. A human-readable description of the resource.
+       * 
+ * + * 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. A human-readable description of the resource.
+       * 
+ * + * 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. A human-readable description of the resource.
+       * 
+ * + * 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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A human-readable description of the resource.
+       * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. A human-readable description of the resource.
+       * 
+ * + * 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_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** + * + * + *
+       * Optional. Set of labels associated with the `WasmPluginVersion`
+       * resource.
+       * 
+ * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object imageUri_ = ""; + + /** + * + * + *
+       * Optional. URI of the container image containing the Wasm module, stored
+       * in the Artifact Registry. The container image must contain only a single
+       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+       * is created, the URI gets resolved to an image digest and saved in the
+       * `image_digest` field.
+       * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. URI of the container image containing the Wasm module, stored
+       * in the Artifact Registry. The container image must contain only a single
+       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+       * is created, the URI gets resolved to an image digest and saved in the
+       * `image_digest` field.
+       * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. URI of the container image containing the Wasm module, stored
+       * in the Artifact Registry. The container image must contain only a single
+       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+       * is created, the URI gets resolved to an image digest and saved in the
+       * `image_digest` field.
+       * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URI of the container image containing the Wasm module, stored
+       * in the Artifact Registry. The container image must contain only a single
+       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+       * is created, the URI gets resolved to an image digest and saved in the
+       * `image_digest` field.
+       * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + imageUri_ = getDefaultInstance().getImageUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. URI of the container image containing the Wasm module, stored
+       * in the Artifact Registry. The container image must contain only a single
+       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
+       * is created, the URI gets resolved to an image digest and saved in the
+       * `image_digest` field.
+       * 
+ * + * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+       * Output only. The resolved digest for the image specified in `image`.
+       * The digest is resolved during the creation of a
+       * `WasmPluginVersion` resource.
+       * This field holds the digest value regardless of whether a tag or
+       * digest was originally specified in the `image` field.
+       * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageDigest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The resolved digest for the image specified in `image`.
+       * The digest is resolved during the creation of a
+       * `WasmPluginVersion` resource.
+       * This field holds the digest value regardless of whether a tag or
+       * digest was originally specified in the `image` field.
+       * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The resolved digest for the image specified in `image`.
+       * The digest is resolved during the creation of a
+       * `WasmPluginVersion` resource.
+       * This field holds the digest value regardless of whether a tag or
+       * digest was originally specified in the `image` field.
+       * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigest(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageDigest_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The resolved digest for the image specified in `image`.
+       * The digest is resolved during the creation of a
+       * `WasmPluginVersion` resource.
+       * This field holds the digest value regardless of whether a tag or
+       * digest was originally specified in the `image` field.
+       * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearImageDigest() { + imageDigest_ = getDefaultInstance().getImageDigest(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The resolved digest for the image specified in `image`.
+       * The digest is resolved during the creation of a
+       * `WasmPluginVersion` resource.
+       * This field holds the digest value regardless of whether a tag or
+       * digest was originally specified in the `image` field.
+       * 
+ * + * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageDigest_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object pluginConfigDigest_ = ""; + + /** + * + * + *
+       * Output only. This field holds the digest (usually checksum) value for the
+       * plugin configuration. The value is calculated based on the contents of
+       * the `plugin_config_data` field or the container image defined by the
+       * `plugin_config_uri` field.
+       * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + public java.lang.String getPluginConfigDigest() { + java.lang.Object ref = pluginConfigDigest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginConfigDigest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. This field holds the digest (usually checksum) value for the
+       * plugin configuration. The value is calculated based on the contents of
+       * the `plugin_config_data` field or the container image defined by the
+       * `plugin_config_uri` field.
+       * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + public com.google.protobuf.ByteString getPluginConfigDigestBytes() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginConfigDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. This field holds the digest (usually checksum) value for the
+       * plugin configuration. The value is calculated based on the contents of
+       * the `plugin_config_data` field or the container image defined by the
+       * `plugin_config_uri` field.
+       * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pluginConfigDigest to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigDigest(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigDigest_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. This field holds the digest (usually checksum) value for the
+       * plugin configuration. The value is calculated based on the contents of
+       * the `plugin_config_data` field or the container image defined by the
+       * `plugin_config_uri` field.
+       * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigDigest() { + pluginConfigDigest_ = getDefaultInstance().getPluginConfigDigest(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. This field holds the digest (usually checksum) value for the
+       * plugin configuration. The value is calculated based on the contents of
+       * the `plugin_config_data` field or the container image defined by the
+       * `plugin_config_uri` field.
+       * 
+ * + * string plugin_config_digest = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pluginConfigDigest to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginConfigDigest_ = 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.networkservices.v1.WasmPlugin.VersionDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.WasmPlugin.VersionDetails) + private static final com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails(); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionDetails 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.networkservices.v1.WasmPlugin.VersionDetails + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface LogConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.WasmPlugin.LogConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Specifies whether to enable logging for activity by this
+     * plugin.
+     *
+     * Defaults to `false`.
+     * 
+ * + * bool enable = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enable. + */ + boolean getEnable(); + + /** + * + * + *
+     * Non-empty default. Configures the sampling rate of activity logs, where
+     * `1.0` means all logged activity is reported and `0.0` means no activity
+     * is reported. A floating point value between `0.0` and `1.0` indicates
+     * that a percentage of log messages is stored.
+     *
+     * The default value when logging is enabled is `1.0`. The value of the
+     * field must be between `0` and `1` (inclusive).
+     *
+     * This field can be specified only if logging is enabled for this plugin.
+     * 
+ * + * float sample_rate = 2 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * @return The sampleRate. + */ + float getSampleRate(); + + /** + * + * + *
+     * Non-empty default. Specificies the lowest level of the plugin logs that
+     * are exported to Cloud Logging. This setting relates to the logs generated
+     * by using logging statements in your Wasm code.
+     *
+     * This field is can be set only if logging is enabled for the plugin.
+     *
+     * If the field is not provided when logging is enabled, it is set to
+     * `INFO` by default.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The enum numeric value on the wire for minLogLevel. + */ + int getMinLogLevelValue(); + + /** + * + * + *
+     * Non-empty default. Specificies the lowest level of the plugin logs that
+     * are exported to Cloud Logging. This setting relates to the logs generated
+     * by using logging statements in your Wasm code.
+     *
+     * This field is can be set only if logging is enabled for the plugin.
+     *
+     * If the field is not provided when logging is enabled, it is set to
+     * `INFO` by default.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The minLogLevel. + */ + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel getMinLogLevel(); + } + + /** + * + * + *
+   * Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.LogConfig} + */ + public static final class LogConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.WasmPlugin.LogConfig) + LogConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use LogConfig.newBuilder() to construct. + private LogConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LogConfig() { + minLogLevel_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LogConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.class, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder.class); + } + + /** + * + * + *
+     * Possible values to specify the lowest level of logs to be exported to
+     * Cloud Logging.
+     * 
+ * + * Protobuf enum {@code google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel} + */ + public enum LogLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified value. Defaults to `LogLevel.INFO`.
+       * 
+ * + * LOG_LEVEL_UNSPECIFIED = 0; + */ + LOG_LEVEL_UNSPECIFIED(0), + /** + * + * + *
+       * Report logs with TRACE level and above.
+       * 
+ * + * TRACE = 1; + */ + TRACE(1), + /** + * + * + *
+       * Report logs with DEBUG level and above.
+       * 
+ * + * DEBUG = 2; + */ + DEBUG(2), + /** + * + * + *
+       * Report logs with INFO level and above.
+       * 
+ * + * INFO = 3; + */ + INFO(3), + /** + * + * + *
+       * Report logs with WARN level and above.
+       * 
+ * + * WARN = 4; + */ + WARN(4), + /** + * + * + *
+       * Report logs with ERROR level and above.
+       * 
+ * + * ERROR = 5; + */ + ERROR(5), + /** + * + * + *
+       * Report logs with CRITICAL level only.
+       * 
+ * + * CRITICAL = 6; + */ + CRITICAL(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified value. Defaults to `LogLevel.INFO`.
+       * 
+ * + * LOG_LEVEL_UNSPECIFIED = 0; + */ + public static final int LOG_LEVEL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * Report logs with TRACE level and above.
+       * 
+ * + * TRACE = 1; + */ + public static final int TRACE_VALUE = 1; + + /** + * + * + *
+       * Report logs with DEBUG level and above.
+       * 
+ * + * DEBUG = 2; + */ + public static final int DEBUG_VALUE = 2; + + /** + * + * + *
+       * Report logs with INFO level and above.
+       * 
+ * + * INFO = 3; + */ + public static final int INFO_VALUE = 3; + + /** + * + * + *
+       * Report logs with WARN level and above.
+       * 
+ * + * WARN = 4; + */ + public static final int WARN_VALUE = 4; + + /** + * + * + *
+       * Report logs with ERROR level and above.
+       * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + /** + * + * + *
+       * Report logs with CRITICAL level only.
+       * 
+ * + * CRITICAL = 6; + */ + public static final int CRITICAL_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LogLevel 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 LogLevel forNumber(int value) { + switch (value) { + case 0: + return LOG_LEVEL_UNSPECIFIED; + case 1: + return TRACE; + case 2: + return DEBUG; + case 3: + return INFO; + case 4: + return WARN; + case 5: + return ERROR; + case 6: + return CRITICAL; + 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 LogLevel findValueByNumber(int number) { + return LogLevel.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.networkservices.v1.WasmPlugin.LogConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LogLevel[] VALUES = values(); + + public static LogLevel 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 LogLevel(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel) + } + + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_ = false; + + /** + * + * + *
+     * Optional. Specifies whether to enable logging for activity by this
+     * plugin.
+     *
+     * Defaults to `false`.
+     * 
+ * + * bool enable = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; + } + + public static final int SAMPLE_RATE_FIELD_NUMBER = 2; + private float sampleRate_ = 0F; + + /** + * + * + *
+     * Non-empty default. Configures the sampling rate of activity logs, where
+     * `1.0` means all logged activity is reported and `0.0` means no activity
+     * is reported. A floating point value between `0.0` and `1.0` indicates
+     * that a percentage of log messages is stored.
+     *
+     * The default value when logging is enabled is `1.0`. The value of the
+     * field must be between `0` and `1` (inclusive).
+     *
+     * This field can be specified only if logging is enabled for this plugin.
+     * 
+ * + * float sample_rate = 2 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * @return The sampleRate. + */ + @java.lang.Override + public float getSampleRate() { + return sampleRate_; + } + + public static final int MIN_LOG_LEVEL_FIELD_NUMBER = 3; + private int minLogLevel_ = 0; + + /** + * + * + *
+     * Non-empty default. Specificies the lowest level of the plugin logs that
+     * are exported to Cloud Logging. This setting relates to the logs generated
+     * by using logging statements in your Wasm code.
+     *
+     * This field is can be set only if logging is enabled for the plugin.
+     *
+     * If the field is not provided when logging is enabled, it is set to
+     * `INFO` by default.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The enum numeric value on the wire for minLogLevel. + */ + @java.lang.Override + public int getMinLogLevelValue() { + return minLogLevel_; + } + + /** + * + * + *
+     * Non-empty default. Specificies the lowest level of the plugin logs that
+     * are exported to Cloud Logging. This setting relates to the logs generated
+     * by using logging statements in your Wasm code.
+     *
+     * This field is can be set only if logging is enabled for the plugin.
+     *
+     * If the field is not provided when logging is enabled, it is set to
+     * `INFO` by default.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The minLogLevel. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel getMinLogLevel() { + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel result = + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.forNumber(minLogLevel_); + return result == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.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 (enable_ != false) { + output.writeBool(1, enable_); + } + if (java.lang.Float.floatToRawIntBits(sampleRate_) != 0) { + output.writeFloat(2, sampleRate_); + } + if (minLogLevel_ + != com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.LOG_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, minLogLevel_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enable_); + } + if (java.lang.Float.floatToRawIntBits(sampleRate_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, sampleRate_); + } + if (minLogLevel_ + != com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.LOG_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, minLogLevel_); + } + 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.networkservices.v1.WasmPlugin.LogConfig)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig other = + (com.google.cloud.networkservices.v1.WasmPlugin.LogConfig) obj; + + if (getEnable() != other.getEnable()) return false; + if (java.lang.Float.floatToIntBits(getSampleRate()) + != java.lang.Float.floatToIntBits(other.getSampleRate())) return false; + if (minLogLevel_ != other.minLogLevel_) 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) + ENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); + hash = (37 * hash) + SAMPLE_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSampleRate()); + hash = (37 * hash) + MIN_LOG_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + minLogLevel_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig 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.networkservices.v1.WasmPlugin.LogConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + 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.networkservices.v1.WasmPlugin.LogConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + java.io.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.networkservices.v1.WasmPlugin.LogConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseDelimitedFrom( + java.io.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.networkservices.v1.WasmPlugin.LogConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.WasmPlugin.LogConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.LogConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.WasmPlugin.LogConfig) + com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.class, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enable_ = false; + sampleRate_ = 0F; + minLogLevel_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LogConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig build() { + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig buildPartial() { + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig result = + new com.google.cloud.networkservices.v1.WasmPlugin.LogConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.WasmPlugin.LogConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enable_ = enable_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sampleRate_ = sampleRate_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.minLogLevel_ = minLogLevel_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.WasmPlugin.LogConfig) { + return mergeFrom((com.google.cloud.networkservices.v1.WasmPlugin.LogConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.WasmPlugin.LogConfig other) { + if (other == com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance()) + return this; + if (other.getEnable() != false) { + setEnable(other.getEnable()); + } + if (other.getSampleRate() != 0F) { + setSampleRate(other.getSampleRate()); + } + if (other.minLogLevel_ != 0) { + setMinLogLevelValue(other.getMinLogLevelValue()); + } + 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: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: + { + sampleRate_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 24: + { + minLogLevel_ = 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 boolean enable_; + + /** + * + * + *
+       * Optional. Specifies whether to enable logging for activity by this
+       * plugin.
+       *
+       * Defaults to `false`.
+       * 
+ * + * bool enable = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; + } + + /** + * + * + *
+       * Optional. Specifies whether to enable logging for activity by this
+       * plugin.
+       *
+       * Defaults to `false`.
+       * 
+ * + * bool enable = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enable to set. + * @return This builder for chaining. + */ + public Builder setEnable(boolean value) { + + enable_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Specifies whether to enable logging for activity by this
+       * plugin.
+       *
+       * Defaults to `false`.
+       * 
+ * + * bool enable = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnable() { + bitField0_ = (bitField0_ & ~0x00000001); + enable_ = false; + onChanged(); + return this; + } + + private float sampleRate_; + + /** + * + * + *
+       * Non-empty default. Configures the sampling rate of activity logs, where
+       * `1.0` means all logged activity is reported and `0.0` means no activity
+       * is reported. A floating point value between `0.0` and `1.0` indicates
+       * that a percentage of log messages is stored.
+       *
+       * The default value when logging is enabled is `1.0`. The value of the
+       * field must be between `0` and `1` (inclusive).
+       *
+       * This field can be specified only if logging is enabled for this plugin.
+       * 
+ * + * float sample_rate = 2 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * @return The sampleRate. + */ + @java.lang.Override + public float getSampleRate() { + return sampleRate_; + } + + /** + * + * + *
+       * Non-empty default. Configures the sampling rate of activity logs, where
+       * `1.0` means all logged activity is reported and `0.0` means no activity
+       * is reported. A floating point value between `0.0` and `1.0` indicates
+       * that a percentage of log messages is stored.
+       *
+       * The default value when logging is enabled is `1.0`. The value of the
+       * field must be between `0` and `1` (inclusive).
+       *
+       * This field can be specified only if logging is enabled for this plugin.
+       * 
+ * + * float sample_rate = 2 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * @param value The sampleRate to set. + * @return This builder for chaining. + */ + public Builder setSampleRate(float value) { + + sampleRate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Non-empty default. Configures the sampling rate of activity logs, where
+       * `1.0` means all logged activity is reported and `0.0` means no activity
+       * is reported. A floating point value between `0.0` and `1.0` indicates
+       * that a percentage of log messages is stored.
+       *
+       * The default value when logging is enabled is `1.0`. The value of the
+       * field must be between `0` and `1` (inclusive).
+       *
+       * This field can be specified only if logging is enabled for this plugin.
+       * 
+ * + * float sample_rate = 2 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * @return This builder for chaining. + */ + public Builder clearSampleRate() { + bitField0_ = (bitField0_ & ~0x00000002); + sampleRate_ = 0F; + onChanged(); + return this; + } + + private int minLogLevel_ = 0; + + /** + * + * + *
+       * Non-empty default. Specificies the lowest level of the plugin logs that
+       * are exported to Cloud Logging. This setting relates to the logs generated
+       * by using logging statements in your Wasm code.
+       *
+       * This field is can be set only if logging is enabled for the plugin.
+       *
+       * If the field is not provided when logging is enabled, it is set to
+       * `INFO` by default.
+       * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The enum numeric value on the wire for minLogLevel. + */ + @java.lang.Override + public int getMinLogLevelValue() { + return minLogLevel_; + } + + /** + * + * + *
+       * Non-empty default. Specificies the lowest level of the plugin logs that
+       * are exported to Cloud Logging. This setting relates to the logs generated
+       * by using logging statements in your Wasm code.
+       *
+       * This field is can be set only if logging is enabled for the plugin.
+       *
+       * If the field is not provided when logging is enabled, it is set to
+       * `INFO` by default.
+       * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @param value The enum numeric value on the wire for minLogLevel to set. + * @return This builder for chaining. + */ + public Builder setMinLogLevelValue(int value) { + minLogLevel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Non-empty default. Specificies the lowest level of the plugin logs that
+       * are exported to Cloud Logging. This setting relates to the logs generated
+       * by using logging statements in your Wasm code.
+       *
+       * This field is can be set only if logging is enabled for the plugin.
+       *
+       * If the field is not provided when logging is enabled, it is set to
+       * `INFO` by default.
+       * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return The minLogLevel. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel getMinLogLevel() { + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel result = + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.forNumber( + minLogLevel_); + return result == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Non-empty default. Specificies the lowest level of the plugin logs that
+       * are exported to Cloud Logging. This setting relates to the logs generated
+       * by using logging statements in your Wasm code.
+       *
+       * This field is can be set only if logging is enabled for the plugin.
+       *
+       * If the field is not provided when logging is enabled, it is set to
+       * `INFO` by default.
+       * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @param value The minLogLevel to set. + * @return This builder for chaining. + */ + public Builder setMinLogLevel( + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + minLogLevel_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Non-empty default. Specificies the lowest level of the plugin logs that
+       * are exported to Cloud Logging. This setting relates to the logs generated
+       * by using logging statements in your Wasm code.
+       *
+       * This field is can be set only if logging is enabled for the plugin.
+       *
+       * If the field is not provided when logging is enabled, it is set to
+       * `INFO` by default.
+       * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel min_log_level = 3 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * + * + * @return This builder for chaining. + */ + public Builder clearMinLogLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + minLogLevel_ = 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.networkservices.v1.WasmPlugin.LogConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.WasmPlugin.LogConfig) + private static final com.google.cloud.networkservices.v1.WasmPlugin.LogConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.WasmPlugin.LogConfig(); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.LogConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogConfig 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.networkservices.v1.WasmPlugin.LogConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UsedByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.WasmPlugin.UsedBy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Full name of the resource
+     * https://google.aip.dev/122#full-resource-names, for example
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+     * Output only. Full name of the resource
+     * https://google.aip.dev/122#full-resource-names, for example
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + + /** + * + * + *
+   * Defines a resource that uses the `WasmPlugin` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.UsedBy} + */ + public static final class UsedBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.WasmPlugin.UsedBy) + UsedByOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UsedBy.newBuilder() to construct. + private UsedBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UsedBy() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UsedBy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.class, + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. Full name of the resource
+     * https://google.aip.dev/122#full-resource-names, for example
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. Full name of the resource
+     * https://google.aip.dev/122#full-resource-names, for example
+     * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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.networkservices.v1.WasmPlugin.UsedBy)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy other = + (com.google.cloud.networkservices.v1.WasmPlugin.UsedBy) 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.networkservices.v1.WasmPlugin.UsedBy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy 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.networkservices.v1.WasmPlugin.UsedBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseFrom( + 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.networkservices.v1.WasmPlugin.UsedBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseFrom( + java.io.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.networkservices.v1.WasmPlugin.UsedBy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseDelimitedFrom( + java.io.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.networkservices.v1.WasmPlugin.UsedBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.WasmPlugin.UsedBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * Defines a resource that uses the `WasmPlugin` resource.
+     * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin.UsedBy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.WasmPlugin.UsedBy) + com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.class, + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.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.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_UsedBy_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy build() { + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy buildPartial() { + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy result = + new com.google.cloud.networkservices.v1.WasmPlugin.UsedBy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.WasmPlugin.UsedBy 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.networkservices.v1.WasmPlugin.UsedBy) { + return mergeFrom((com.google.cloud.networkservices.v1.WasmPlugin.UsedBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.WasmPlugin.UsedBy other) { + if (other == com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.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_ = ""; + + /** + * + * + *
+       * Output only. Full name of the resource
+       * https://google.aip.dev/122#full-resource-names, for example
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. Full name of the resource
+       * https://google.aip.dev/122#full-resource-names, for example
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. Full name of the resource
+       * https://google.aip.dev/122#full-resource-names, for example
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Full name of the resource
+       * https://google.aip.dev/122#full-resource-names, for example
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Full name of the resource
+       * https://google.aip.dev/122#full-resource-names, for example
+       * `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + 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.networkservices.v1.WasmPlugin.UsedBy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.WasmPlugin.UsedBy) + private static final com.google.cloud.networkservices.v1.WasmPlugin.UsedBy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.WasmPlugin.UsedBy(); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin.UsedBy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UsedBy 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.networkservices.v1.WasmPlugin.UsedBy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the `WasmPlugin` resource in the following format:
+   * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * 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. Name of the `WasmPlugin` resource in the following format:
+   * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.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 LABELS_FIELD_NUMBER = 5; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MAIN_VERSION_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object mainVersionId_ = ""; + + /** + * + * + *
+   * Optional. The ID of the `WasmPluginVersion` resource that is the
+   * currently serving one. The version referred to must be a child of this
+   * `WasmPlugin` resource.
+   * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mainVersionId. + */ + @java.lang.Override + public java.lang.String getMainVersionId() { + java.lang.Object ref = mainVersionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mainVersionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID of the `WasmPluginVersion` resource that is the
+   * currently serving one. The version referred to must be a child of this
+   * `WasmPlugin` resource.
+   * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mainVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMainVersionIdBytes() { + java.lang.Object ref = mainVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mainVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOG_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.networkservices.v1.WasmPlugin.LogConfig logConfig_; + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the logConfig field is set. + */ + @java.lang.Override + public boolean hasLogConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The logConfig. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig getLogConfig() { + return logConfig_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance() + : logConfig_; + } + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder getLogConfigOrBuilder() { + return logConfig_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance() + : logConfig_; + } + + public static final int VERSIONS_FIELD_NUMBER = 10; + + private static final class VersionsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_VersionsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + .getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + versions_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + internalGetVersions() { + if (versions_ == null) { + return com.google.protobuf.MapField.emptyMapField(VersionsDefaultEntryHolder.defaultEntry); + } + return versions_; + } + + public int getVersionsCount() { + return internalGetVersions().getMap().size(); + } + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsVersions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetVersions().getMap().containsKey(key); + } + + /** Use {@link #getVersionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + getVersions() { + return getVersionsMap(); + } + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + getVersionsMap() { + return internalGetVersions().getMap(); + } + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + getVersionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetVersions().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails getVersionsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetVersions().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int USED_BY_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List usedBy_; + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getUsedByList() { + return usedBy_; + } + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getUsedByOrBuilderList() { + return usedBy_; + } + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getUsedByCount() { + return usedBy_.size(); + } + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy getUsedBy(int index) { + return usedBy_.get(index); + } + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder getUsedByOrBuilder( + int index) { + return usedBy_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mainVersionId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getLogConfig()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetVersions(), VersionsDefaultEntryHolder.defaultEntry, 10); + for (int i = 0; i < usedBy_.size(); i++) { + output.writeMessage(11, usedBy_.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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mainVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mainVersionId_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLogConfig()); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + entry : internalGetVersions().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + versions__ = + VersionsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, versions__); + } + for (int i = 0; i < usedBy_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, usedBy_.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.networkservices.v1.WasmPlugin)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.WasmPlugin other = + (com.google.cloud.networkservices.v1.WasmPlugin) obj; + + if (!getName().equals(other.getName())) 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 (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getMainVersionId().equals(other.getMainVersionId())) return false; + if (hasLogConfig() != other.hasLogConfig()) return false; + if (hasLogConfig()) { + if (!getLogConfig().equals(other.getLogConfig())) return false; + } + if (!internalGetVersions().equals(other.internalGetVersions())) return false; + if (!getUsedByList().equals(other.getUsedByList())) 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 (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 = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + MAIN_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getMainVersionId().hashCode(); + if (hasLogConfig()) { + hash = (37 * hash) + LOG_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLogConfig().hashCode(); + } + if (!internalGetVersions().getMap().isEmpty()) { + hash = (37 * hash) + VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetVersions().hashCode(); + } + if (getUsedByCount() > 0) { + hash = (37 * hash) + USED_BY_FIELD_NUMBER; + hash = (53 * hash) + getUsedByList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin 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.networkservices.v1.WasmPlugin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom( + 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.networkservices.v1.WasmPlugin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom( + java.io.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.networkservices.v1.WasmPlugin parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseDelimitedFrom( + java.io.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.networkservices.v1.WasmPlugin parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.WasmPlugin prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * `WasmPlugin` is a resource representing a service executing
+   * a customer-provided Wasm module.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPlugin} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.WasmPlugin) + com.google.cloud.networkservices.v1.WasmPluginOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetLabels(); + case 10: + return internalGetVersions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 5: + return internalGetMutableLabels(); + case 10: + return internalGetMutableVersions(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPlugin.class, + com.google.cloud.networkservices.v1.WasmPlugin.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.WasmPlugin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getLogConfigFieldBuilder(); + getUsedByFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + internalGetMutableLabels().clear(); + mainVersionId_ = ""; + logConfig_ = null; + if (logConfigBuilder_ != null) { + logConfigBuilder_.dispose(); + logConfigBuilder_ = null; + } + internalGetMutableVersions().clear(); + if (usedByBuilder_ == null) { + usedBy_ = java.util.Collections.emptyList(); + } else { + usedBy_ = null; + usedByBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPlugin_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin build() { + com.google.cloud.networkservices.v1.WasmPlugin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin buildPartial() { + com.google.cloud.networkservices.v1.WasmPlugin result = + new com.google.cloud.networkservices.v1.WasmPlugin(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.networkservices.v1.WasmPlugin result) { + if (usedByBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + usedBy_ = java.util.Collections.unmodifiableList(usedBy_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.usedBy_ = usedBy_; + } else { + result.usedBy_ = usedByBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.networkservices.v1.WasmPlugin result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.mainVersionId_ = mainVersionId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.logConfig_ = logConfigBuilder_ == null ? logConfig_ : logConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.versions_ = internalGetVersions().build(VersionsDefaultEntryHolder.defaultEntry); + } + 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.networkservices.v1.WasmPlugin) { + return mergeFrom((com.google.cloud.networkservices.v1.WasmPlugin) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.WasmPlugin other) { + if (other == com.google.cloud.networkservices.v1.WasmPlugin.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000008; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000010; + if (!other.getMainVersionId().isEmpty()) { + mainVersionId_ = other.mainVersionId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasLogConfig()) { + mergeLogConfig(other.getLogConfig()); + } + internalGetMutableVersions().mergeFrom(other.internalGetVersions()); + bitField0_ |= 0x00000080; + if (usedByBuilder_ == null) { + if (!other.usedBy_.isEmpty()) { + if (usedBy_.isEmpty()) { + usedBy_ = other.usedBy_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureUsedByIsMutable(); + usedBy_.addAll(other.usedBy_); + } + onChanged(); + } + } else { + if (!other.usedBy_.isEmpty()) { + if (usedByBuilder_.isEmpty()) { + usedByBuilder_.dispose(); + usedByBuilder_ = null; + usedBy_ = other.usedBy_; + bitField0_ = (bitField0_ & ~0x00000100); + usedByBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUsedByFieldBuilder() + : null; + } else { + usedByBuilder_.addAllMessages(other.usedBy_); + } + } + } + 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(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + mainVersionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 74: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + versions__ = + input.readMessage( + VersionsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableVersions() + .ensureBuilderMap() + .put(versions__.getKey(), versions__.getValue()); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy m = + input.readMessage( + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.parser(), + extensionRegistry); + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + usedBy_.add(m); + } else { + usedByBuilder_.addMessage(m); + } + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the `WasmPlugin` resource in the following format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+     * 
+ * + * 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. Name of the `WasmPlugin` resource in the following format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+     * 
+ * + * 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. Name of the `WasmPlugin` resource in the following format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+     * 
+ * + * 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. Name of the `WasmPlugin` resource in the following format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+     * 
+ * + * 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. Name of the `WasmPlugin` resource in the following format:
+     * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+     * 
+ * + * 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 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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000010; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000010; + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPlugin` resource.
+     *
+     * The format must comply with [the following
+     * requirements](/compute/docs/labeling-resources#requirements).
+     * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object mainVersionId_ = ""; + + /** + * + * + *
+     * Optional. The ID of the `WasmPluginVersion` resource that is the
+     * currently serving one. The version referred to must be a child of this
+     * `WasmPlugin` resource.
+     * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mainVersionId. + */ + public java.lang.String getMainVersionId() { + java.lang.Object ref = mainVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mainVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the `WasmPluginVersion` resource that is the
+     * currently serving one. The version referred to must be a child of this
+     * `WasmPlugin` resource.
+     * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mainVersionId. + */ + public com.google.protobuf.ByteString getMainVersionIdBytes() { + java.lang.Object ref = mainVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mainVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the `WasmPluginVersion` resource that is the
+     * currently serving one. The version referred to must be a child of this
+     * `WasmPlugin` resource.
+     * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mainVersionId to set. + * @return This builder for chaining. + */ + public Builder setMainVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mainVersionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the `WasmPluginVersion` resource that is the
+     * currently serving one. The version referred to must be a child of this
+     * `WasmPlugin` resource.
+     * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMainVersionId() { + mainVersionId_ = getDefaultInstance().getMainVersionId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the `WasmPluginVersion` resource that is the
+     * currently serving one. The version referred to must be a child of this
+     * `WasmPlugin` resource.
+     * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mainVersionId to set. + * @return This builder for chaining. + */ + public Builder setMainVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mainVersionId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.WasmPlugin.LogConfig logConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder> + logConfigBuilder_; + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the logConfig field is set. + */ + public boolean hasLogConfig() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The logConfig. + */ + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig getLogConfig() { + if (logConfigBuilder_ == null) { + return logConfig_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance() + : logConfig_; + } else { + return logConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLogConfig(com.google.cloud.networkservices.v1.WasmPlugin.LogConfig value) { + if (logConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + logConfig_ = value; + } else { + logConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLogConfig( + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder builderForValue) { + if (logConfigBuilder_ == null) { + logConfig_ = builderForValue.build(); + } else { + logConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLogConfig(com.google.cloud.networkservices.v1.WasmPlugin.LogConfig value) { + if (logConfigBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && logConfig_ != null + && logConfig_ + != com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance()) { + getLogConfigBuilder().mergeFrom(value); + } else { + logConfig_ = value; + } + } else { + logConfigBuilder_.mergeFrom(value); + } + if (logConfig_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLogConfig() { + bitField0_ = (bitField0_ & ~0x00000040); + logConfig_ = null; + if (logConfigBuilder_ != null) { + logConfigBuilder_.dispose(); + logConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder getLogConfigBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getLogConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder + getLogConfigOrBuilder() { + if (logConfigBuilder_ != null) { + return logConfigBuilder_.getMessageOrBuilder(); + } else { + return logConfig_ == null + ? com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.getDefaultInstance() + : logConfig_; + } + } + + /** + * + * + *
+     * Optional. Specifies the logging options for the activity performed by this
+     * plugin. If logging is enabled, plugin logs are exported to
+     * Cloud Logging.
+     * Note that the settings relate to the logs generated by using
+     * logging statements in your Wasm code.
+     * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder> + getLogConfigFieldBuilder() { + if (logConfigBuilder_ == null) { + logConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder>( + getLogConfig(), getParentForChildren(), isClean()); + logConfig_ = null; + } + return logConfigBuilder_; + } + + private static final class VersionsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> { + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails build( + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder val) { + if (val instanceof com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) { + return (com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) val; + } + return ((com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder) val) + .build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + defaultEntry() { + return VersionsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final VersionsConverter versionsConverter = new VersionsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder> + versions_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder> + internalGetVersions() { + if (versions_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(versionsConverter); + } + return versions_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder> + internalGetMutableVersions() { + if (versions_ == null) { + versions_ = new com.google.protobuf.MapFieldBuilder<>(versionsConverter); + } + bitField0_ |= 0x00000080; + onChanged(); + return versions_; + } + + public int getVersionsCount() { + return internalGetVersions().ensureBuilderMap().size(); + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsVersions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetVersions().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getVersionsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + getVersions() { + return getVersionsMap(); + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + getVersionsMap() { + return internalGetVersions().getImmutableMap(); + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails + getVersionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder> + map = internalGetMutableVersions().ensureBuilderMap(); + return map.containsKey(key) ? versionsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails getVersionsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder> + map = internalGetMutableVersions().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return versionsConverter.build(map.get(key)); + } + + public Builder clearVersions() { + bitField0_ = (bitField0_ & ~0x00000080); + internalGetMutableVersions().clear(); + return this; + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeVersions(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableVersions().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + getMutableVersions() { + bitField0_ |= 0x00000080; + return internalGetMutableVersions().ensureMessageMap(); + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putVersions( + java.lang.String key, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableVersions().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllVersions( + java.util.Map< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + values) { + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableVersions().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000080; + return this; + } + + /** + * + * + *
+     * Optional. All versions of this `WasmPlugin` resource in the key-value
+     * format. The key is the resource ID, and the value is the `VersionDetails`
+     * object.
+     *
+     * Lets you create or update a `WasmPlugin` resource and its versions in a
+     * single request. When the `main_version_id` field is not empty, it must
+     * point to one of the `VersionDetails` objects in the map.
+     *
+     * If provided in a `PATCH` request, the new versions replace the
+     * previous set. Any version omitted from the `versions` field is removed.
+     * Because the `WasmPluginVersion` resource is immutable, if a
+     * `WasmPluginVersion` resource with the same name already exists and differs,
+     * the request fails.
+     *
+     * Note: In a `GET` request, this field is populated only if the field
+     * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+     * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder + putVersionsBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder> + builderMap = internalGetMutableVersions().ensureBuilderMap(); + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetailsOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) { + entry = ((com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails.Builder) entry; + } + + private java.util.List usedBy_ = + java.util.Collections.emptyList(); + + private void ensureUsedByIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + usedBy_ = + new java.util.ArrayList(usedBy_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy, + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder> + usedByBuilder_; + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getUsedByList() { + if (usedByBuilder_ == null) { + return java.util.Collections.unmodifiableList(usedBy_); + } else { + return usedByBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getUsedByCount() { + if (usedByBuilder_ == null) { + return usedBy_.size(); + } else { + return usedByBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy getUsedBy(int index) { + if (usedByBuilder_ == null) { + return usedBy_.get(index); + } else { + return usedByBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUsedBy( + int index, com.google.cloud.networkservices.v1.WasmPlugin.UsedBy value) { + if (usedByBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsedByIsMutable(); + usedBy_.set(index, value); + onChanged(); + } else { + usedByBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUsedBy( + int index, com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder builderForValue) { + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + usedBy_.set(index, builderForValue.build()); + onChanged(); + } else { + usedByBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUsedBy(com.google.cloud.networkservices.v1.WasmPlugin.UsedBy value) { + if (usedByBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsedByIsMutable(); + usedBy_.add(value); + onChanged(); + } else { + usedByBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUsedBy( + int index, com.google.cloud.networkservices.v1.WasmPlugin.UsedBy value) { + if (usedByBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsedByIsMutable(); + usedBy_.add(index, value); + onChanged(); + } else { + usedByBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUsedBy( + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder builderForValue) { + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + usedBy_.add(builderForValue.build()); + onChanged(); + } else { + usedByBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUsedBy( + int index, com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder builderForValue) { + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + usedBy_.add(index, builderForValue.build()); + onChanged(); + } else { + usedByBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllUsedBy( + java.lang.Iterable + values) { + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, usedBy_); + onChanged(); + } else { + usedByBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUsedBy() { + if (usedByBuilder_ == null) { + usedBy_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + usedByBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeUsedBy(int index) { + if (usedByBuilder_ == null) { + ensureUsedByIsMutable(); + usedBy_.remove(index); + onChanged(); + } else { + usedByBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder getUsedByBuilder( + int index) { + return getUsedByFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder getUsedByOrBuilder( + int index) { + if (usedByBuilder_ == null) { + return usedBy_.get(index); + } else { + return usedByBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUsedByOrBuilderList() { + if (usedByBuilder_ != null) { + return usedByBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(usedBy_); + } + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder addUsedByBuilder() { + return getUsedByFieldBuilder() + .addBuilder(com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder addUsedByBuilder( + int index) { + return getUsedByFieldBuilder() + .addBuilder( + index, com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. List of all
+     * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+     * that use this `WasmPlugin` resource.
+     * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUsedByBuilderList() { + return getUsedByFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy, + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder> + getUsedByFieldBuilder() { + if (usedByBuilder_ == null) { + usedByBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy, + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy.Builder, + com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder>( + usedBy_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); + usedBy_ = null; + } + return usedByBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.WasmPlugin) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.WasmPlugin) + private static final com.google.cloud.networkservices.v1.WasmPlugin DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.WasmPlugin(); + } + + public static com.google.cloud.networkservices.v1.WasmPlugin getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WasmPlugin 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.networkservices.v1.WasmPlugin getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginName.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginName.java new file mode 100644 index 000000000000..7821c68d018b --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginName.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.networkservices.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 WasmPluginName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_WASM_PLUGIN = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String wasmPlugin; + + @Deprecated + protected WasmPluginName() { + project = null; + location = null; + wasmPlugin = null; + } + + private WasmPluginName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + wasmPlugin = Preconditions.checkNotNull(builder.getWasmPlugin()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getWasmPlugin() { + return wasmPlugin; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static WasmPluginName of(String project, String location, String wasmPlugin) { + return newBuilder().setProject(project).setLocation(location).setWasmPlugin(wasmPlugin).build(); + } + + public static String format(String project, String location, String wasmPlugin) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setWasmPlugin(wasmPlugin) + .build() + .toString(); + } + + public static WasmPluginName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_WASM_PLUGIN.validatedMatch( + formattedString, "WasmPluginName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("wasm_plugin")); + } + + 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 (WasmPluginName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_WASM_PLUGIN.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 (wasmPlugin != null) { + fieldMapBuilder.put("wasm_plugin", wasmPlugin); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_WASM_PLUGIN.instantiate( + "project", project, "location", location, "wasm_plugin", wasmPlugin); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + WasmPluginName that = ((WasmPluginName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.wasmPlugin, that.wasmPlugin); + } + 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(wasmPlugin); + return h; + } + + /** Builder for projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}. */ + public static class Builder { + private String project; + private String location; + private String wasmPlugin; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getWasmPlugin() { + return wasmPlugin; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setWasmPlugin(String wasmPlugin) { + this.wasmPlugin = wasmPlugin; + return this; + } + + private Builder(WasmPluginName wasmPluginName) { + this.project = wasmPluginName.project; + this.location = wasmPluginName.location; + this.wasmPlugin = wasmPluginName.wasmPlugin; + } + + public WasmPluginName build() { + return new WasmPluginName(this); + } + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginOrBuilder.java new file mode 100644 index 000000000000..81c69a2fdcfe --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginOrBuilder.java @@ -0,0 +1,550 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface WasmPluginOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.WasmPlugin) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. Name of the `WasmPlugin` resource in the following format:
+   * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the `WasmPlugin` resource in the following format:
+   * `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPlugin` resource.
+   *
+   * The format must comply with [the following
+   * requirements](/compute/docs/labeling-resources#requirements).
+   * 
+ * + * map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The ID of the `WasmPluginVersion` resource that is the
+   * currently serving one. The version referred to must be a child of this
+   * `WasmPlugin` resource.
+   * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mainVersionId. + */ + java.lang.String getMainVersionId(); + + /** + * + * + *
+   * Optional. The ID of the `WasmPluginVersion` resource that is the
+   * currently serving one. The version referred to must be a child of this
+   * `WasmPlugin` resource.
+   * 
+ * + * string main_version_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mainVersionId. + */ + com.google.protobuf.ByteString getMainVersionIdBytes(); + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the logConfig field is set. + */ + boolean hasLogConfig(); + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The logConfig. + */ + com.google.cloud.networkservices.v1.WasmPlugin.LogConfig getLogConfig(); + + /** + * + * + *
+   * Optional. Specifies the logging options for the activity performed by this
+   * plugin. If logging is enabled, plugin logs are exported to
+   * Cloud Logging.
+   * Note that the settings relate to the logs generated by using
+   * logging statements in your Wasm code.
+   * 
+ * + * + * .google.cloud.networkservices.v1.WasmPlugin.LogConfig log_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.WasmPlugin.LogConfigOrBuilder getLogConfigOrBuilder(); + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getVersionsCount(); + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsVersions(java.lang.String key); + + /** Use {@link #getVersionsMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getVersions(); + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getVersionsMap(); + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails getVersionsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails defaultValue); + + /** + * + * + *
+   * Optional. All versions of this `WasmPlugin` resource in the key-value
+   * format. The key is the resource ID, and the value is the `VersionDetails`
+   * object.
+   *
+   * Lets you create or update a `WasmPlugin` resource and its versions in a
+   * single request. When the `main_version_id` field is not empty, it must
+   * point to one of the `VersionDetails` objects in the map.
+   *
+   * If provided in a `PATCH` request, the new versions replace the
+   * previous set. Any version omitted from the `versions` field is removed.
+   * Because the `WasmPluginVersion` resource is immutable, if a
+   * `WasmPluginVersion` resource with the same name already exists and differs,
+   * the request fails.
+   *
+   * Note: In a `GET` request, this field is populated only if the field
+   * `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.
+   * 
+ * + * + * map<string, .google.cloud.networkservices.v1.WasmPlugin.VersionDetails> versions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.WasmPlugin.VersionDetails getVersionsOrThrow( + java.lang.String key); + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getUsedByList(); + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkservices.v1.WasmPlugin.UsedBy getUsedBy(int index); + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getUsedByCount(); + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getUsedByOrBuilderList(); + + /** + * + * + *
+   * Output only. List of all
+   * [extensions](https://cloud.google.com/service-extensions/docs/overview)
+   * that use this `WasmPlugin` resource.
+   * 
+ * + * + * repeated .google.cloud.networkservices.v1.WasmPlugin.UsedBy used_by = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkservices.v1.WasmPlugin.UsedByOrBuilder getUsedByOrBuilder(int index); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java new file mode 100644 index 000000000000..287d274b1917 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java @@ -0,0 +1,2982 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * A single immutable version of a `WasmPlugin` resource.
+ * Defines the Wasm module used and optionally its runtime config.
+ * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPluginVersion} + */ +public final class WasmPluginVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.WasmPluginVersion) + WasmPluginVersionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use WasmPluginVersion.newBuilder() to construct. + private WasmPluginVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WasmPluginVersion() { + name_ = ""; + description_ = ""; + imageUri_ = ""; + imageDigest_ = ""; + pluginConfigDigest_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WasmPluginVersion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPluginVersion.class, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder.class); + } + + private int bitField0_; + private int pluginConfigSourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object pluginConfigSource_; + + public enum PluginConfigSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLUGIN_CONFIG_DATA(12), + PLUGIN_CONFIG_URI(13), + PLUGINCONFIGSOURCE_NOT_SET(0); + private final int value; + + private PluginConfigSourceCase(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 PluginConfigSourceCase valueOf(int value) { + return forNumber(value); + } + + public static PluginConfigSourceCase forNumber(int value) { + switch (value) { + case 12: + return PLUGIN_CONFIG_DATA; + case 13: + return PLUGIN_CONFIG_URI; + case 0: + return PLUGINCONFIGSOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PluginConfigSourceCase getPluginConfigSourceCase() { + return PluginConfigSourceCase.forNumber(pluginConfigSourceCase_); + } + + public static final int PLUGIN_CONFIG_DATA_FIELD_NUMBER = 12; + + /** + * + * + *
+   * Configuration for the plugin.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. When a new
+   * `WasmPluginVersion` resource is created, the digest of the
+   * contents is saved in the `plugin_config_digest` field.
+   * 
+ * + * bytes plugin_config_data = 12; + * + * @return Whether the pluginConfigData field is set. + */ + @java.lang.Override + public boolean hasPluginConfigData() { + return pluginConfigSourceCase_ == 12; + } + + /** + * + * + *
+   * Configuration for the plugin.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. When a new
+   * `WasmPluginVersion` resource is created, the digest of the
+   * contents is saved in the `plugin_config_digest` field.
+   * 
+ * + * bytes plugin_config_data = 12; + * + * @return The pluginConfigData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigData() { + if (pluginConfigSourceCase_ == 12) { + return (com.google.protobuf.ByteString) pluginConfigSource_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + public static final int PLUGIN_CONFIG_URI_FIELD_NUMBER = 13; + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return Whether the pluginConfigUri field is set. + */ + public boolean hasPluginConfigUri() { + return pluginConfigSourceCase_ == 13; + } + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return The pluginConfigUri. + */ + public java.lang.String getPluginConfigUri() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 13) { + ref = pluginConfigSource_; + } + if (ref instanceof java.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 (pluginConfigSourceCase_ == 13) { + pluginConfigSource_ = s; + } + return s; + } + } + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return The bytes for pluginConfigUri. + */ + public com.google.protobuf.ByteString getPluginConfigUriBytes() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 13) { + ref = pluginConfigSource_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (pluginConfigSourceCase_ == 13) { + pluginConfigSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. Name of the `WasmPluginVersion` resource in the following
+   * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+   * versions/{wasm_plugin_version}`.
+   * 
+ * + * 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. Name of the `WasmPluginVersion` resource in the following
+   * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+   * versions/{wasm_plugin_version}`.
+   * 
+ * + * 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 CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 = 4; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.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 timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 5 [(.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. A human-readable description of the resource.
+   * 
+ * + * string description = 5 [(.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 LABELS_FIELD_NUMBER = 6; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IMAGE_URI_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageUri_ = ""; + + /** + * + * + *
+   * Optional. URI of the container image containing the plugin, stored in the
+   * Artifact Registry.
+   * When a new `WasmPluginVersion` resource is created, the digest
+   * of the container image is saved in the `image_digest` field.
+   * When downloading an image, the digest value is used instead of an
+   * image tag.
+   * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. URI of the container image containing the plugin, stored in the
+   * Artifact Registry.
+   * When a new `WasmPluginVersion` resource is created, the digest
+   * of the container image is saved in the `image_digest` field.
+   * When downloading an image, the digest value is used instead of an
+   * image tag.
+   * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_DIGEST_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+   * Output only. The resolved digest for the image specified in the `image`
+   * field. The digest is resolved during the creation of `WasmPluginVersion`
+   * resource. This field holds the digest value, regardless of whether a tag or
+   * digest was originally specified in the `image` field.
+   * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + @java.lang.Override + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageDigest_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The resolved digest for the image specified in the `image`
+   * field. The digest is resolved during the creation of `WasmPluginVersion`
+   * resource. This field holds the digest value, regardless of whether a tag or
+   * digest was originally specified in the `image` field.
+   * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLUGIN_CONFIG_DIGEST_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object pluginConfigDigest_ = ""; + + /** + * + * + *
+   * Output only. This field holds the digest (usually checksum) value for the
+   * plugin configuration. The value is calculated based on the contents of
+   * `plugin_config_data` or the container image defined by
+   * the `plugin_config_uri` field.
+   * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + @java.lang.Override + public java.lang.String getPluginConfigDigest() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginConfigDigest_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. This field holds the digest (usually checksum) value for the
+   * plugin configuration. The value is calculated based on the contents of
+   * `plugin_config_data` or the container image defined by
+   * the `plugin_config_uri` field.
+   * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigDigestBytes() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginConfigDigest_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 6); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, imageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, imageDigest_); + } + if (pluginConfigSourceCase_ == 12) { + output.writeBytes(12, (com.google.protobuf.ByteString) pluginConfigSource_); + } + if (pluginConfigSourceCase_ == 13) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, pluginConfigSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginConfigDigest_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, pluginConfigDigest_); + } + 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(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, imageUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageDigest_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, imageDigest_); + } + if (pluginConfigSourceCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeBytesSize( + 12, (com.google.protobuf.ByteString) pluginConfigSource_); + } + if (pluginConfigSourceCase_ == 13) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, pluginConfigSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pluginConfigDigest_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, pluginConfigDigest_); + } + 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.networkservices.v1.WasmPluginVersion)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.WasmPluginVersion other = + (com.google.cloud.networkservices.v1.WasmPluginVersion) obj; + + if (!getName().equals(other.getName())) 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 (!getDescription().equals(other.getDescription())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getImageDigest().equals(other.getImageDigest())) return false; + if (!getPluginConfigDigest().equals(other.getPluginConfigDigest())) return false; + if (!getPluginConfigSourceCase().equals(other.getPluginConfigSourceCase())) return false; + switch (pluginConfigSourceCase_) { + case 12: + if (!getPluginConfigData().equals(other.getPluginConfigData())) return false; + break; + case 13: + if (!getPluginConfigUri().equals(other.getPluginConfigUri())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + 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 = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (37 * hash) + IMAGE_DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getImageDigest().hashCode(); + hash = (37 * hash) + PLUGIN_CONFIG_DIGEST_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigDigest().hashCode(); + switch (pluginConfigSourceCase_) { + case 12: + hash = (37 * hash) + PLUGIN_CONFIG_DATA_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigData().hashCode(); + break; + case 13: + hash = (37 * hash) + PLUGIN_CONFIG_URI_FIELD_NUMBER; + hash = (53 * hash) + getPluginConfigUri().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion 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.networkservices.v1.WasmPluginVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + 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.networkservices.v1.WasmPluginVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + java.io.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.networkservices.v1.WasmPluginVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseDelimitedFrom( + java.io.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.networkservices.v1.WasmPluginVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, 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.networkservices.v1.WasmPluginVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A single immutable version of a `WasmPlugin` resource.
+   * Defines the Wasm module used and optionally its runtime config.
+   * 
+ * + * Protobuf type {@code google.cloud.networkservices.v1.WasmPluginVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.WasmPluginVersion) + com.google.cloud.networkservices.v1.WasmPluginVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 6: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.WasmPluginVersion.class, + com.google.cloud.networkservices.v1.WasmPluginVersion.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.WasmPluginVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + internalGetMutableLabels().clear(); + imageUri_ = ""; + imageDigest_ = ""; + pluginConfigDigest_ = ""; + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.ExtensibilityProto + .internal_static_google_cloud_networkservices_v1_WasmPluginVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersion getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersion build() { + com.google.cloud.networkservices.v1.WasmPluginVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.WasmPluginVersion buildPartial() { + com.google.cloud.networkservices.v1.WasmPluginVersion result = + new com.google.cloud.networkservices.v1.WasmPluginVersion(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.WasmPluginVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.imageUri_ = imageUri_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.imageDigest_ = imageDigest_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.pluginConfigDigest_ = pluginConfigDigest_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.networkservices.v1.WasmPluginVersion result) { + result.pluginConfigSourceCase_ = pluginConfigSourceCase_; + result.pluginConfigSource_ = this.pluginConfigSource_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.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.networkservices.v1.WasmPluginVersion) { + return mergeFrom((com.google.cloud.networkservices.v1.WasmPluginVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.WasmPluginVersion other) { + if (other == com.google.cloud.networkservices.v1.WasmPluginVersion.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getImageDigest().isEmpty()) { + imageDigest_ = other.imageDigest_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getPluginConfigDigest().isEmpty()) { + pluginConfigDigest_ = other.pluginConfigDigest_; + bitField0_ |= 0x00000200; + onChanged(); + } + switch (other.getPluginConfigSourceCase()) { + case PLUGIN_CONFIG_DATA: + { + setPluginConfigData(other.getPluginConfigData()); + break; + } + case PLUGIN_CONFIG_URI: + { + pluginConfigSourceCase_ = 13; + pluginConfigSource_ = other.pluginConfigSource_; + onChanged(); + break; + } + case PLUGINCONFIGSOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 66: + { + imageUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + imageDigest_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 98: + { + pluginConfigSource_ = input.readBytes(); + pluginConfigSourceCase_ = 12; + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + pluginConfigSourceCase_ = 13; + pluginConfigSource_ = s; + break; + } // case 106 + case 114: + { + pluginConfigDigest_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 114 + 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 pluginConfigSourceCase_ = 0; + private java.lang.Object pluginConfigSource_; + + public PluginConfigSourceCase getPluginConfigSourceCase() { + return PluginConfigSourceCase.forNumber(pluginConfigSourceCase_); + } + + public Builder clearPluginConfigSource() { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` resource is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 12; + * + * @return Whether the pluginConfigData field is set. + */ + public boolean hasPluginConfigData() { + return pluginConfigSourceCase_ == 12; + } + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` resource is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 12; + * + * @return The pluginConfigData. + */ + public com.google.protobuf.ByteString getPluginConfigData() { + if (pluginConfigSourceCase_ == 12) { + return (com.google.protobuf.ByteString) pluginConfigSource_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` resource is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 12; + * + * @param value The pluginConfigData to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigSourceCase_ = 12; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Configuration for the plugin.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. When a new
+     * `WasmPluginVersion` resource is created, the digest of the
+     * contents is saved in the `plugin_config_digest` field.
+     * 
+ * + * bytes plugin_config_data = 12; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigData() { + if (pluginConfigSourceCase_ == 12) { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @return Whether the pluginConfigUri field is set. + */ + @java.lang.Override + public boolean hasPluginConfigUri() { + return pluginConfigSourceCase_ == 13; + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @return The pluginConfigUri. + */ + @java.lang.Override + public java.lang.String getPluginConfigUri() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 13) { + ref = pluginConfigSource_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (pluginConfigSourceCase_ == 13) { + pluginConfigSource_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @return The bytes for pluginConfigUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPluginConfigUriBytes() { + java.lang.Object ref = ""; + if (pluginConfigSourceCase_ == 13) { + ref = pluginConfigSource_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (pluginConfigSourceCase_ == 13) { + pluginConfigSource_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @param value The pluginConfigUri to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigSourceCase_ = 13; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigUri() { + if (pluginConfigSourceCase_ == 13) { + pluginConfigSourceCase_ = 0; + pluginConfigSource_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * URI of the plugin configuration stored in the Artifact Registry.
+     * The configuration is provided to the plugin at runtime through
+     * the `ON_CONFIGURE` callback. The container image must contain
+     * only a single file with the name `plugin.config`. When a
+     * new `WasmPluginVersion` resource is created, the digest of the
+     * container image is saved in the `plugin_config_digest` field.
+     * 
+ * + * string plugin_config_uri = 13; + * + * @param value The bytes for pluginConfigUri to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginConfigSourceCase_ = 13; + pluginConfigSource_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. Name of the `WasmPluginVersion` resource in the following
+     * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+     * versions/{wasm_plugin_version}`.
+     * 
+ * + * 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. Name of the `WasmPluginVersion` resource in the following
+     * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+     * versions/{wasm_plugin_version}`.
+     * 
+ * + * 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. Name of the `WasmPluginVersion` resource in the following
+     * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+     * versions/{wasm_plugin_version}`.
+     * 
+ * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the `WasmPluginVersion` resource in the following
+     * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+     * versions/{wasm_plugin_version}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. Name of the `WasmPluginVersion` resource in the following
+     * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+     * versions/{wasm_plugin_version}`.
+     * 
+ * + * 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_ |= 0x00000004; + 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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 timestamp when the resource was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + 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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.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 timestamp when the resource was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 5 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 5 [(.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. A human-readable description of the resource.
+     * 
+ * + * string description = 5 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A human-readable description of the resource.
+     * 
+ * + * string description = 5 [(.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_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
+     * Optional. Set of labels associated with the `WasmPluginVersion`
+     * resource.
+     * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object imageUri_ = ""; + + /** + * + * + *
+     * Optional. URI of the container image containing the plugin, stored in the
+     * Artifact Registry.
+     * When a new `WasmPluginVersion` resource is created, the digest
+     * of the container image is saved in the `image_digest` field.
+     * When downloading an image, the digest value is used instead of an
+     * image tag.
+     * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. URI of the container image containing the plugin, stored in the
+     * Artifact Registry.
+     * When a new `WasmPluginVersion` resource is created, the digest
+     * of the container image is saved in the `image_digest` field.
+     * When downloading an image, the digest value is used instead of an
+     * image tag.
+     * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. URI of the container image containing the plugin, stored in the
+     * Artifact Registry.
+     * When a new `WasmPluginVersion` resource is created, the digest
+     * of the container image is saved in the `image_digest` field.
+     * When downloading an image, the digest value is used instead of an
+     * image tag.
+     * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. URI of the container image containing the plugin, stored in the
+     * Artifact Registry.
+     * When a new `WasmPluginVersion` resource is created, the digest
+     * of the container image is saved in the `image_digest` field.
+     * When downloading an image, the digest value is used instead of an
+     * image tag.
+     * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + imageUri_ = getDefaultInstance().getImageUri(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. URI of the container image containing the plugin, stored in the
+     * Artifact Registry.
+     * When a new `WasmPluginVersion` resource is created, the digest
+     * of the container image is saved in the `image_digest` field.
+     * When downloading an image, the digest value is used instead of an
+     * image tag.
+     * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageUri_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object imageDigest_ = ""; + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in the `image`
+     * field. The digest is resolved during the creation of `WasmPluginVersion`
+     * resource. This field holds the digest value, regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + public java.lang.String getImageDigest() { + java.lang.Object ref = imageDigest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageDigest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in the `image`
+     * field. The digest is resolved during the creation of `WasmPluginVersion`
+     * resource. This field holds the digest value, regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + public com.google.protobuf.ByteString getImageDigestBytes() { + java.lang.Object ref = imageDigest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in the `image`
+     * field. The digest is resolved during the creation of `WasmPluginVersion`
+     * resource. This field holds the digest value, regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigest(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageDigest_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in the `image`
+     * field. The digest is resolved during the creation of `WasmPluginVersion`
+     * resource. This field holds the digest value, regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearImageDigest() { + imageDigest_ = getDefaultInstance().getImageDigest(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resolved digest for the image specified in the `image`
+     * field. The digest is resolved during the creation of `WasmPluginVersion`
+     * resource. This field holds the digest value, regardless of whether a tag or
+     * digest was originally specified in the `image` field.
+     * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for imageDigest to set. + * @return This builder for chaining. + */ + public Builder setImageDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageDigest_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object pluginConfigDigest_ = ""; + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * `plugin_config_data` or the container image defined by
+     * the `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + public java.lang.String getPluginConfigDigest() { + java.lang.Object ref = pluginConfigDigest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pluginConfigDigest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * `plugin_config_data` or the container image defined by
+     * the `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + public com.google.protobuf.ByteString getPluginConfigDigestBytes() { + java.lang.Object ref = pluginConfigDigest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pluginConfigDigest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * `plugin_config_data` or the container image defined by
+     * the `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pluginConfigDigest to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigDigest(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pluginConfigDigest_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * `plugin_config_data` or the container image defined by
+     * the `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPluginConfigDigest() { + pluginConfigDigest_ = getDefaultInstance().getPluginConfigDigest(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. This field holds the digest (usually checksum) value for the
+     * plugin configuration. The value is calculated based on the contents of
+     * `plugin_config_data` or the container image defined by
+     * the `plugin_config_uri` field.
+     * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for pluginConfigDigest to set. + * @return This builder for chaining. + */ + public Builder setPluginConfigDigestBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pluginConfigDigest_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(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.networkservices.v1.WasmPluginVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.WasmPluginVersion) + private static final com.google.cloud.networkservices.v1.WasmPluginVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.WasmPluginVersion(); + } + + public static com.google.cloud.networkservices.v1.WasmPluginVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WasmPluginVersion 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.networkservices.v1.WasmPluginVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionName.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionName.java new file mode 100644 index 000000000000..61ba8d10e485 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionName.java @@ -0,0 +1,269 @@ +/* + * 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.networkservices.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 WasmPluginVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_WASM_PLUGIN_WASM_PLUGIN_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String wasmPlugin; + private final String wasmPluginVersion; + + @Deprecated + protected WasmPluginVersionName() { + project = null; + location = null; + wasmPlugin = null; + wasmPluginVersion = null; + } + + private WasmPluginVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + wasmPlugin = Preconditions.checkNotNull(builder.getWasmPlugin()); + wasmPluginVersion = Preconditions.checkNotNull(builder.getWasmPluginVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getWasmPlugin() { + return wasmPlugin; + } + + public String getWasmPluginVersion() { + return wasmPluginVersion; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static WasmPluginVersionName of( + String project, String location, String wasmPlugin, String wasmPluginVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setWasmPlugin(wasmPlugin) + .setWasmPluginVersion(wasmPluginVersion) + .build(); + } + + public static String format( + String project, String location, String wasmPlugin, String wasmPluginVersion) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setWasmPlugin(wasmPlugin) + .setWasmPluginVersion(wasmPluginVersion) + .build() + .toString(); + } + + public static WasmPluginVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_WASM_PLUGIN_WASM_PLUGIN_VERSION.validatedMatch( + formattedString, "WasmPluginVersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("wasm_plugin"), + matchMap.get("wasm_plugin_version")); + } + + 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 (WasmPluginVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_WASM_PLUGIN_WASM_PLUGIN_VERSION.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 (wasmPlugin != null) { + fieldMapBuilder.put("wasm_plugin", wasmPlugin); + } + if (wasmPluginVersion != null) { + fieldMapBuilder.put("wasm_plugin_version", wasmPluginVersion); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_WASM_PLUGIN_WASM_PLUGIN_VERSION.instantiate( + "project", + project, + "location", + location, + "wasm_plugin", + wasmPlugin, + "wasm_plugin_version", + wasmPluginVersion); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + WasmPluginVersionName that = ((WasmPluginVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.wasmPlugin, that.wasmPlugin) + && Objects.equals(this.wasmPluginVersion, that.wasmPluginVersion); + } + 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(wasmPlugin); + h *= 1000003; + h ^= Objects.hashCode(wasmPluginVersion); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}. + */ + public static class Builder { + private String project; + private String location; + private String wasmPlugin; + private String wasmPluginVersion; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getWasmPlugin() { + return wasmPlugin; + } + + public String getWasmPluginVersion() { + return wasmPluginVersion; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setWasmPlugin(String wasmPlugin) { + this.wasmPlugin = wasmPlugin; + return this; + } + + public Builder setWasmPluginVersion(String wasmPluginVersion) { + this.wasmPluginVersion = wasmPluginVersion; + return this; + } + + private Builder(WasmPluginVersionName wasmPluginVersionName) { + this.project = wasmPluginVersionName.project; + this.location = wasmPluginVersionName.location; + this.wasmPlugin = wasmPluginVersionName.wasmPlugin; + this.wasmPluginVersion = wasmPluginVersionName.wasmPluginVersion; + } + + public WasmPluginVersionName build() { + return new WasmPluginVersionName(this); + } + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java new file mode 100644 index 000000000000..b47181036263 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java @@ -0,0 +1,421 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +public interface WasmPluginVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.WasmPluginVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for the plugin.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. When a new
+   * `WasmPluginVersion` resource is created, the digest of the
+   * contents is saved in the `plugin_config_digest` field.
+   * 
+ * + * bytes plugin_config_data = 12; + * + * @return Whether the pluginConfigData field is set. + */ + boolean hasPluginConfigData(); + + /** + * + * + *
+   * Configuration for the plugin.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. When a new
+   * `WasmPluginVersion` resource is created, the digest of the
+   * contents is saved in the `plugin_config_digest` field.
+   * 
+ * + * bytes plugin_config_data = 12; + * + * @return The pluginConfigData. + */ + com.google.protobuf.ByteString getPluginConfigData(); + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return Whether the pluginConfigUri field is set. + */ + boolean hasPluginConfigUri(); + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return The pluginConfigUri. + */ + java.lang.String getPluginConfigUri(); + + /** + * + * + *
+   * URI of the plugin configuration stored in the Artifact Registry.
+   * The configuration is provided to the plugin at runtime through
+   * the `ON_CONFIGURE` callback. The container image must contain
+   * only a single file with the name `plugin.config`. When a
+   * new `WasmPluginVersion` resource is created, the digest of the
+   * container image is saved in the `plugin_config_digest` field.
+   * 
+ * + * string plugin_config_uri = 13; + * + * @return The bytes for pluginConfigUri. + */ + com.google.protobuf.ByteString getPluginConfigUriBytes(); + + /** + * + * + *
+   * Identifier. Name of the `WasmPluginVersion` resource in the following
+   * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+   * versions/{wasm_plugin_version}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. Name of the `WasmPluginVersion` resource in the following
+   * format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/
+   * versions/{wasm_plugin_version}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The timestamp when the resource was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+   * Optional. A human-readable description of the resource.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
+   * Optional. Set of labels associated with the `WasmPluginVersion`
+   * resource.
+   * 
+ * + * map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. URI of the container image containing the plugin, stored in the
+   * Artifact Registry.
+   * When a new `WasmPluginVersion` resource is created, the digest
+   * of the container image is saved in the `image_digest` field.
+   * When downloading an image, the digest value is used instead of an
+   * image tag.
+   * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + + /** + * + * + *
+   * Optional. URI of the container image containing the plugin, stored in the
+   * Artifact Registry.
+   * When a new `WasmPluginVersion` resource is created, the digest
+   * of the container image is saved in the `image_digest` field.
+   * When downloading an image, the digest value is used instead of an
+   * image tag.
+   * 
+ * + * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
+   * Output only. The resolved digest for the image specified in the `image`
+   * field. The digest is resolved during the creation of `WasmPluginVersion`
+   * resource. This field holds the digest value, regardless of whether a tag or
+   * digest was originally specified in the `image` field.
+   * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageDigest. + */ + java.lang.String getImageDigest(); + + /** + * + * + *
+   * Output only. The resolved digest for the image specified in the `image`
+   * field. The digest is resolved during the creation of `WasmPluginVersion`
+   * resource. This field holds the digest value, regardless of whether a tag or
+   * digest was originally specified in the `image` field.
+   * 
+ * + * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageDigest. + */ + com.google.protobuf.ByteString getImageDigestBytes(); + + /** + * + * + *
+   * Output only. This field holds the digest (usually checksum) value for the
+   * plugin configuration. The value is calculated based on the contents of
+   * `plugin_config_data` or the container image defined by
+   * the `plugin_config_uri` field.
+   * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pluginConfigDigest. + */ + java.lang.String getPluginConfigDigest(); + + /** + * + * + *
+   * Output only. This field holds the digest (usually checksum) value for the
+   * plugin configuration. The value is calculated based on the contents of
+   * `plugin_config_data` or the container image defined by
+   * the `plugin_config_uri` field.
+   * 
+ * + * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for pluginConfigDigest. + */ + com.google.protobuf.ByteString getPluginConfigDigestBytes(); + + com.google.cloud.networkservices.v1.WasmPluginVersion.PluginConfigSourceCase + getPluginConfigSourceCase(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginView.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginView.java new file mode 100644 index 000000000000..367144b55514 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginView.java @@ -0,0 +1,185 @@ +/* + * 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/networkservices/v1/extensibility.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * Determines the information that should be returned by the server.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkservices.v1.WasmPluginView} + */ +public enum WasmPluginView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified value. Do not use.
+   * 
+ * + * WASM_PLUGIN_VIEW_UNSPECIFIED = 0; + */ + WASM_PLUGIN_VIEW_UNSPECIFIED(0), + /** + * + * + *
+   * If specified in the `GET` request for a `WasmPlugin` resource, the server's
+   * response includes just the `WasmPlugin` resource.
+   * 
+ * + * WASM_PLUGIN_VIEW_BASIC = 1; + */ + WASM_PLUGIN_VIEW_BASIC(1), + /** + * + * + *
+   * If specified in the `GET` request for a `WasmPlugin` resource, the server's
+   * response includes the `WasmPlugin` resource with all its versions.
+   * 
+ * + * WASM_PLUGIN_VIEW_FULL = 2; + */ + WASM_PLUGIN_VIEW_FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified value. Do not use.
+   * 
+ * + * WASM_PLUGIN_VIEW_UNSPECIFIED = 0; + */ + public static final int WASM_PLUGIN_VIEW_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * If specified in the `GET` request for a `WasmPlugin` resource, the server's
+   * response includes just the `WasmPlugin` resource.
+   * 
+ * + * WASM_PLUGIN_VIEW_BASIC = 1; + */ + public static final int WASM_PLUGIN_VIEW_BASIC_VALUE = 1; + + /** + * + * + *
+   * If specified in the `GET` request for a `WasmPlugin` resource, the server's
+   * response includes the `WasmPlugin` resource with all its versions.
+   * 
+ * + * WASM_PLUGIN_VIEW_FULL = 2; + */ + public static final int WASM_PLUGIN_VIEW_FULL_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 WasmPluginView 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 WasmPluginView forNumber(int value) { + switch (value) { + case 0: + return WASM_PLUGIN_VIEW_UNSPECIFIED; + case 1: + return WASM_PLUGIN_VIEW_BASIC; + case 2: + return WASM_PLUGIN_VIEW_FULL; + 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 WasmPluginView findValueByNumber(int number) { + return WasmPluginView.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.networkservices.v1.ExtensibilityProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final WasmPluginView[] VALUES = values(); + + public static WasmPluginView 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 WasmPluginView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.WasmPluginView) +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java new file mode 100644 index 000000000000..fd791618f349 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java @@ -0,0 +1,164 @@ +/* + * 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/networkservices/v1/dep.proto + +// Protobuf Java Version: 3.25.8 +package com.google.cloud.networkservices.v1; + +/** + * + * + *
+ * The format of communication supported by the extension.
+ * 
+ * + * Protobuf enum {@code google.cloud.networkservices.v1.WireFormat} + */ +public enum WireFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not specified.
+   * 
+ * + * WIRE_FORMAT_UNSPECIFIED = 0; + */ + WIRE_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+   * The extension service uses ext_proc gRPC API over a gRPC stream. This is
+   * the default value if the wire format is not specified. The backend service
+   * for the extension must use HTTP2 or H2C as the protocol. All
+   * `supported_events` for a client request are sent as part of the same
+   * gRPC stream.
+   * 
+ * + * EXT_PROC_GRPC = 1; + */ + EXT_PROC_GRPC(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not specified.
+   * 
+ * + * WIRE_FORMAT_UNSPECIFIED = 0; + */ + public static final int WIRE_FORMAT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * The extension service uses ext_proc gRPC API over a gRPC stream. This is
+   * the default value if the wire format is not specified. The backend service
+   * for the extension must use HTTP2 or H2C as the protocol. All
+   * `supported_events` for a client request are sent as part of the same
+   * gRPC stream.
+   * 
+ * + * EXT_PROC_GRPC = 1; + */ + public static final int EXT_PROC_GRPC_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WireFormat 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 WireFormat forNumber(int value) { + switch (value) { + case 0: + return WIRE_FORMAT_UNSPECIFIED; + case 1: + return EXT_PROC_GRPC; + 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 WireFormat findValueByNumber(int number) { + return WireFormat.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.networkservices.v1.DepProto.getDescriptor().getEnumTypes().get(2); + } + + private static final WireFormat[] VALUES = values(); + + public static WireFormat 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 WireFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.WireFormat) +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto index 2a69f8718b65..fc4921a7eb90 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto @@ -163,6 +163,67 @@ service DepService { metadata_type: "OperationMetadata" }; } + + // Lists `AuthzExtension` resources in a given project and location. + rpc ListAuthzExtensions(ListAuthzExtensionsRequest) + returns (ListAuthzExtensionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/authzExtensions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of the specified `AuthzExtension` resource. + rpc GetAuthzExtension(GetAuthzExtensionRequest) returns (AuthzExtension) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/authzExtensions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new `AuthzExtension` resource in a given project + // and location. + rpc CreateAuthzExtension(CreateAuthzExtensionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/authzExtensions" + body: "authz_extension" + }; + option (google.api.method_signature) = + "parent,authz_extension,authz_extension_id"; + option (google.longrunning.operation_info) = { + response_type: "AuthzExtension" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of the specified `AuthzExtension` + // resource. + rpc UpdateAuthzExtension(UpdateAuthzExtensionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{authz_extension.name=projects/*/locations/*/authzExtensions/*}" + body: "authz_extension" + }; + option (google.api.method_signature) = "authz_extension,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AuthzExtension" + metadata_type: "OperationMetadata" + }; + } + + // Deletes the specified `AuthzExtension` resource. + rpc DeleteAuthzExtension(DeleteAuthzExtensionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/authzExtensions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } } // The part of the request or response for which the extension is called. @@ -195,10 +256,10 @@ enum EventType { RESPONSE_TRAILERS = 6; } -// Load balancing schemes supported by the `LbTrafficExtension` resource and -// `LbRouteExtension` resource. -// For more information, refer to [Choosing a load -// balancer](https://cloud.google.com/load-balancing/docs/backend-service). +// Load balancing schemes supported by the `LbTrafficExtension`, +// `LbRouteExtension`, and `LbEdgeExtension` resources. +// For more information, refer to [Backend services +// overview](https://cloud.google.com/load-balancing/docs/backend-service). enum LoadBalancingScheme { // Default value. Do not use. LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; @@ -211,6 +272,19 @@ enum LoadBalancingScheme { EXTERNAL_MANAGED = 2; } +// The format of communication supported by the extension. +enum WireFormat { + // Not specified. + WIRE_FORMAT_UNSPECIFIED = 0; + + // The extension service uses ext_proc gRPC API over a gRPC stream. This is + // the default value if the wire format is not specified. The backend service + // for the extension must use HTTP2 or H2C as the protocol. All + // `supported_events` for a client request are sent as part of the same + // gRPC stream. + EXT_PROC_GRPC = 1; +} + // A single extension chain wrapper that contains the match conditions and // extensions to execute. message ExtensionChain { @@ -237,12 +311,13 @@ message ExtensionChain { // Optional. The `:authority` header in the gRPC request sent from Envoy // to the extension service. // Required for Callout extensions. + // + // This field is not supported for plugin extensions. Setting it results in + // a validation error. string authority = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The reference to the service that runs the extension. // - // Currently only callout extensions are supported here. - // // To configure a callout extension, `service` must be a fully-qualified // reference // to a [backend @@ -251,18 +326,39 @@ message ExtensionChain { // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` // or // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + // + // To configure a plugin extension, `service` must be a reference + // to a [`WasmPlugin` + // resource](https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.wasmPlugins) + // in the format: + // `projects/{project}/locations/{location}/wasmPlugins/{plugin}` + // or + // `//networkservices.googleapis.com/projects/{project}/locations/{location}/wasmPlugins/{wasmPlugin}`. + // + // Plugin extensions are currently supported for the + // `LbTrafficExtension`, the `LbRouteExtension`, and the `LbEdgeExtension` + // resources. string service = 3 [(google.api.field_behavior) = REQUIRED]; // Optional. A set of events during request or response processing for which - // this extension is called. This field is required for the - // `LbTrafficExtension` resource. It must not be set for the - // `LbRouteExtension` resource. + // this extension is called. + // + // For the `LbTrafficExtension` resource, this field is required. + // + // For the `LbRouteExtension` resource, this field is optional. If + // unspecified, `REQUEST_HEADERS` event is assumed as supported. + // + // For the `LbEdgeExtension` resource, this field is required and must only + // contain `REQUEST_HEADERS` event. repeated EventType supported_events = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Specifies the timeout for each individual message on the - // stream. The timeout must be between 10-1000 milliseconds. Required for - // Callout extensions. + // stream. The timeout must be between `10`-`10000` milliseconds. Required + // for callout extensions. + // + // This field is not supported for plugin extensions. Setting it results in + // a validation error. google.protobuf.Duration timeout = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -287,6 +383,37 @@ message ExtensionChain { // Each element is a string indicating the header name. repeated string forward_headers = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metadata provided here is included as part of the + // `metadata_context` (of type `google.protobuf.Struct`) in the + // `ProcessingRequest` message sent to the extension server. + // + // The metadata is available under the namespace + // `com.google....`. + // For example: + // `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. + // + // The following variables are supported in the metadata: + // + // `{forwarding_rule_id}` - substituted with the forwarding rule's fully + // qualified resource name. + // + // This field must not be set for plugin extensions. Setting it results in + // a validation error. + // + // You can set metadata at either the resource level or the extension level. + // The extension level metadata is recommended because you can pass a + // different set of metadata through each extension to the backend. + // + // This field is subject to following limitations: + // + // * The total size of the metadata must be less than 1KiB. + // * The total number of keys in the metadata must be less than 16. + // * The length of each key must be less than 64 characters. + // * The length of each value must be less than 1024 characters. + // * All values must be strings. + google.protobuf.Struct metadata = 9 + [(google.api.field_behavior) = OPTIONAL]; } // Required. The name for this extension chain. @@ -304,7 +431,8 @@ message ExtensionChain { // At least one extension is required. // Up to 3 extensions can be defined for each extension chain // for `LbTrafficExtension` resource. - // `LbRouteExtension` chains are limited to 1 extension per extension chain. + // `LbRouteExtension` and `LbEdgeExtension` chains are limited to 1 extension + // per extension chain. repeated Extension extensions = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -346,10 +474,11 @@ message LbTrafficExtension { // for Google Cloud resources. map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - // Required. A list of references to the forwarding rules to which this - // service extension is attached to. At least one forwarding rule is required. - // There can be only one `LBTrafficExtension` resource per forwarding rule. - repeated string forwarding_rules = 5 [(google.api.field_behavior) = REQUIRED]; + // Optional. A list of references to the forwarding rules to which this + // service extension is attached. At least one forwarding rule is required. + // Only one `LbTrafficExtension` resource can be associated with a forwarding + // rule. + repeated string forwarding_rules = 5 [(google.api.field_behavior) = OPTIONAL]; // Required. A set of ordered extension chains that contain the match // conditions and extensions to execute. Match conditions for each extension @@ -362,27 +491,40 @@ message LbTrafficExtension { // Required. All backend services and forwarding rules referenced by this // extension must share the same load balancing scheme. Supported values: - // `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - // [Choosing a load - // balancer](https://cloud.google.com/load-balancing/docs/backend-service). + // `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to + // [Backend services + // overview](https://cloud.google.com/load-balancing/docs/backend-service). LoadBalancingScheme load_balancing_scheme = 8 [(google.api.field_behavior) = REQUIRED]; - // Optional. The metadata provided here is included in the - // `ProcessingRequest.metadata_context.filter_metadata` map field. The - // metadata is available under the key + // Optional. The metadata provided here is included as part of the + // `metadata_context` (of type `google.protobuf.Struct`) in the + // `ProcessingRequest` message sent to the extension server. + // + // The metadata applies to all extensions in all extensions chains in this + // resource. + // + // The metadata is available under the key // `com.google.lb_traffic_extension.`. + // // The following variables are supported in the metadata: // // `{forwarding_rule_id}` - substituted with the forwarding rule's fully // qualified resource name. + // + // This field must not be set if at least one of the extension chains + // contains plugin extensions. Setting it results in a validation error. + // + // You can set metadata at either the resource level or the extension level. + // The extension level metadata is recommended because you can pass a + // different set of metadata through each extension to the backend. google.protobuf.Struct metadata = 10 [(google.api.field_behavior) = OPTIONAL]; } // Message for requesting list of `LbTrafficExtension` resources. message ListLbTrafficExtensionsRequest { // Required. The project and location from which the `LbTrafficExtension` - // resources are listed, specified in the following format: + // resources are listed. These values are specified in the following format: // `projects/{project}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -401,7 +543,7 @@ message ListLbTrafficExtensionsRequest { // Optional. Filtering results. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Hint for how to order the results. + // Optional. Hint about how to order the results. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -452,12 +594,11 @@ message CreateLbTrafficExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes since the first request. + // that for 60 minutes since the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is @@ -472,7 +613,7 @@ message CreateLbTrafficExtensionRequest { message UpdateLbTrafficExtensionRequest { // Optional. Used to specify the fields to be overwritten in the // `LbTrafficExtension` resource by the update. - // The fields specified in the update_mask are relative to the resource, not + // The fields specified in the `update_mask` are relative to the resource, not // the full request. A field is overwritten if it is in the mask. If the // user does not specify a mask, then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 @@ -485,12 +626,11 @@ message UpdateLbTrafficExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes since the first request. + // that for 60 minutes since the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is @@ -516,12 +656,11 @@ message DeleteLbTrafficExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes after the first request. + // that for 60 minutes after the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is @@ -569,8 +708,9 @@ message LbRouteExtension { map labels = 4 [(google.api.field_behavior) = OPTIONAL]; // Required. A list of references to the forwarding rules to which this - // service extension is attached to. At least one forwarding rule is required. - // There can be only one `LbRouteExtension` resource per forwarding rule. + // service extension is attached. At least one forwarding rule is required. + // Only one `LbRouteExtension` resource can be associated with a forwarding + // rule. repeated string forwarding_rules = 5 [(google.api.field_behavior) = REQUIRED]; // Required. A set of ordered extension chains that contain the match @@ -585,27 +725,39 @@ message LbRouteExtension { // Required. All backend services and forwarding rules referenced by this // extension must share the same load balancing scheme. Supported values: // `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - // [Choosing a load - // balancer](https://cloud.google.com/load-balancing/docs/backend-service). + // [Backend services + // overview](https://cloud.google.com/load-balancing/docs/backend-service). LoadBalancingScheme load_balancing_scheme = 8 [(google.api.field_behavior) = REQUIRED]; // Optional. The metadata provided here is included as part of the // `metadata_context` (of type `google.protobuf.Struct`) in the - // `ProcessingRequest` message sent to the extension - // server. The metadata is available under the namespace + // `ProcessingRequest` message sent to the extension server. + // + // The metadata applies to all extensions in all extensions chains in this + // resource. + // + // The metadata is available under the key // `com.google.lb_route_extension.`. - // The following variables are supported in the metadata Struct: + // + // The following variables are supported in the metadata: // // `{forwarding_rule_id}` - substituted with the forwarding rule's fully // qualified resource name. + // + // This field must not be set if at least one of the extension chains + // contains plugin extensions. Setting it results in a validation error. + // + // You can set metadata at either the resource level or the extension level. + // The extension level metadata is recommended because you can pass a + // different set of metadata through each extension to the backend. google.protobuf.Struct metadata = 10 [(google.api.field_behavior) = OPTIONAL]; } // Message for requesting list of `LbRouteExtension` resources. message ListLbRouteExtensionsRequest { // Required. The project and location from which the `LbRouteExtension` - // resources are listed, specified in the following format: + // resources are listed. These values are specified in the following format: // `projects/{project}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -624,7 +776,7 @@ message ListLbRouteExtensionsRequest { // Optional. Filtering results. string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Hint for how to order the results. + // Optional. Hint about how to order the results. string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -675,12 +827,11 @@ message CreateLbRouteExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes since the first request. + // that for 60 minutes since the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is @@ -695,7 +846,7 @@ message CreateLbRouteExtensionRequest { message UpdateLbRouteExtensionRequest { // Optional. Used to specify the fields to be overwritten in the // `LbRouteExtension` resource by the update. - // The fields specified in the update_mask are relative to the resource, not + // The fields specified in the `update_mask` are relative to the resource, not // the full request. A field is overwritten if it is in the mask. If the // user does not specify a mask, then all fields are overwritten. google.protobuf.FieldMask update_mask = 1 @@ -708,12 +859,11 @@ message UpdateLbRouteExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes since the first request. + // that for 60 minutes since the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is @@ -739,12 +889,261 @@ message DeleteLbRouteExtensionRequest { // Optional. An optional request ID to identify requests. Specify a unique // request ID so that if you must retry your request, the server can ignore // the request if it has already been completed. The server guarantees - // that for at least 60 minutes after the first request. + // that for 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server ignores the second request This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// `AuthzExtension` is a resource that allows traffic forwarding +// to a callout backend service to make an authorization decision. +message AuthzExtension { + option (google.api.resource) = { + type: "networkservices.googleapis.com/AuthzExtension" + pattern: "projects/{project}/locations/{location}/authzExtensions/{authz_extension}" + plural: "authzExtensions" + singular: "authzExtension" + }; + + // Required. Identifier. Name of the `AuthzExtension` resource in the + // following format: + // `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A human-readable description of the resource. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set of labels associated with the `AuthzExtension` + // resource. + // + // The format must comply with [the requirements for + // labels](/compute/docs/labeling-resources#requirements) for Google Cloud + // resources. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. All backend services and forwarding rules referenced by this + // extension must share the same load balancing scheme. Supported values: + // `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + // [Backend services + // overview](https://cloud.google.com/load-balancing/docs/backend-service). + LoadBalancingScheme load_balancing_scheme = 6 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `:authority` header in the gRPC request sent from Envoy + // to the extension service. + string authority = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reference to the service that runs the extension. + // + // To configure a callout extension, `service` must be a fully-qualified + // reference + // to a [backend + // service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + // in the format: + // `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + // or + // `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + string service = 8 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the timeout for each individual message on the stream. + // The timeout must be between 10-10000 milliseconds. + google.protobuf.Duration timeout = 9 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Determines how the proxy behaves if the call to the extension + // fails or times out. + // + // When set to `TRUE`, request or response processing continues without + // error. Any subsequent extensions in the extension chain are also + // executed. When set to `FALSE` or the default setting of `FALSE` is used, + // one of the following happens: + // + // * If response headers have not been delivered to the downstream client, + // a generic 500 error is returned to the client. The error response can be + // tailored by configuring a custom error response in the load balancer. + // + // * If response headers have been delivered, then the HTTP stream to the + // downstream client is reset. + bool fail_open = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The metadata provided here is included as part of the + // `metadata_context` (of type `google.protobuf.Struct`) in the + // `ProcessingRequest` message sent to the extension + // server. The metadata is available under the namespace + // `com.google.authz_extension.`. + // The following variables are supported in the metadata Struct: + // + // `{forwarding_rule_id}` - substituted with the forwarding rule's fully + // qualified resource name. + google.protobuf.Struct metadata = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of the HTTP headers to forward to the extension + // (from the client). If omitted, all headers are sent. + // Each element is a string indicating the header name. + repeated string forward_headers = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The format of communication supported by the callout extension. + // If not specified, the default value `EXT_PROC_GRPC` is used. + WireFormat wire_format = 14 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for requesting list of `AuthzExtension` resources. +message ListAuthzExtensionsRequest { + // Required. The project and location from which the `AuthzExtension` + // resources are listed. These values are specified in the following format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/AuthzExtension" + } + ]; + + // Optional. Requested page size. The server might return fewer items than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results that the server returns. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint about how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing `AuthzExtension` resources. +message ListAuthzExtensionsResponse { + // The list of `AuthzExtension` resources. + repeated AuthzExtension authz_extensions = 1; + + // A token identifying a page of results that the server returns. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a `AuthzExtension` resource. +message GetAuthzExtensionRequest { + // Required. A name of the `AuthzExtension` resource to get. Must be in + // the format + // `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/AuthzExtension" + } + ]; +} + +// Message for creating a `AuthzExtension` resource. +message CreateAuthzExtensionRequest { + // Required. The parent resource of the `AuthzExtension` resource. Must + // be in the format `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/AuthzExtension" + } + ]; + + // Required. User-provided ID of the `AuthzExtension` resource to be + // created. + string authz_extension_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. `AuthzExtension` resource to be created. + AuthzExtension authz_extension = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server guarantees + // that for 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server ignores the second request This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a `AuthzExtension` resource. +message UpdateAuthzExtensionRequest { + // Required. Used to specify the fields to be overwritten in the + // `AuthzExtension` resource by the update. + // The fields specified in the `update_mask` are relative to the resource, not + // the full request. A field is overwritten if it is in the mask. If the + // user does not specify a mask, then all fields are overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. `AuthzExtension` resource being updated. + AuthzExtension authz_extension = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server guarantees + // that for 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server ignores the second request This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a `AuthzExtension` resource. +message DeleteAuthzExtensionRequest { + // Required. The name of the `AuthzExtension` resource to delete. Must + // be in the format + // `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/AuthzExtension" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server can ignore + // the request if it has already been completed. The server guarantees + // that for 60 minutes after the first request. // // For example, consider a situation where you make an initial request and the // request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, ignores the second request. This prevents + // ID, the server ignores the second request This prevents // clients from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto new file mode 100644 index 000000000000..42fb82f24b53 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto @@ -0,0 +1,495 @@ +// 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networkservices.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkServices.V1"; +option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb"; +option java_multiple_files = true; +option java_outer_classname = "ExtensibilityProto"; +option java_package = "com.google.cloud.networkservices.v1"; +option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; +option ruby_package = "Google::Cloud::NetworkServices::V1"; + +// Determines the information that should be returned by the server. +enum WasmPluginView { + // Unspecified value. Do not use. + WASM_PLUGIN_VIEW_UNSPECIFIED = 0; + + // If specified in the `GET` request for a `WasmPlugin` resource, the server's + // response includes just the `WasmPlugin` resource. + WASM_PLUGIN_VIEW_BASIC = 1; + + // If specified in the `GET` request for a `WasmPlugin` resource, the server's + // response includes the `WasmPlugin` resource with all its versions. + WASM_PLUGIN_VIEW_FULL = 2; +} + +// `WasmPlugin` is a resource representing a service executing +// a customer-provided Wasm module. +message WasmPlugin { + option (google.api.resource) = { + type: "networkservices.googleapis.com/WasmPlugin" + pattern: "projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}" + }; + + // Details of a `WasmPluginVersion` resource to be inlined in the + // `WasmPlugin` resource. + message VersionDetails { + oneof plugin_config_source { + // Configuration for the plugin. + // The configuration is provided to the plugin at runtime through + // the `ON_CONFIGURE` callback. When a new + // `WasmPluginVersion` version is created, the digest of the + // contents is saved in the `plugin_config_digest` field. + bytes plugin_config_data = 9; + + // URI of the plugin configuration stored in the Artifact Registry. + // The configuration is provided to the plugin at runtime through + // the `ON_CONFIGURE` callback. The container image must + // contain only a single file with the name + // `plugin.config`. When a new `WasmPluginVersion` + // resource is created, the digest of the container image is saved in the + // `plugin_config_digest` field. + string plugin_config_uri = 10; + } + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A human-readable description of the resource. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set of labels associated with the `WasmPluginVersion` + // resource. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URI of the container image containing the Wasm module, stored + // in the Artifact Registry. The container image must contain only a single + // file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource + // is created, the URI gets resolved to an image digest and saved in the + // `image_digest` field. + string image_uri = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The resolved digest for the image specified in `image`. + // The digest is resolved during the creation of a + // `WasmPluginVersion` resource. + // This field holds the digest value regardless of whether a tag or + // digest was originally specified in the `image` field. + string image_digest = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field holds the digest (usually checksum) value for the + // plugin configuration. The value is calculated based on the contents of + // the `plugin_config_data` field or the container image defined by the + // `plugin_config_uri` field. + string plugin_config_digest = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Specifies the logging options for the activity performed by this + // plugin. If logging is enabled, plugin logs are exported to + // Cloud Logging. + message LogConfig { + // Possible values to specify the lowest level of logs to be exported to + // Cloud Logging. + enum LogLevel { + // Unspecified value. Defaults to `LogLevel.INFO`. + LOG_LEVEL_UNSPECIFIED = 0; + + // Report logs with TRACE level and above. + TRACE = 1; + + // Report logs with DEBUG level and above. + DEBUG = 2; + + // Report logs with INFO level and above. + INFO = 3; + + // Report logs with WARN level and above. + WARN = 4; + + // Report logs with ERROR level and above. + ERROR = 5; + + // Report logs with CRITICAL level only. + CRITICAL = 6; + } + + // Optional. Specifies whether to enable logging for activity by this + // plugin. + // + // Defaults to `false`. + bool enable = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Non-empty default. Configures the sampling rate of activity logs, where + // `1.0` means all logged activity is reported and `0.0` means no activity + // is reported. A floating point value between `0.0` and `1.0` indicates + // that a percentage of log messages is stored. + // + // The default value when logging is enabled is `1.0`. The value of the + // field must be between `0` and `1` (inclusive). + // + // This field can be specified only if logging is enabled for this plugin. + float sample_rate = 2 [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + + // Non-empty default. Specificies the lowest level of the plugin logs that + // are exported to Cloud Logging. This setting relates to the logs generated + // by using logging statements in your Wasm code. + // + // This field is can be set only if logging is enabled for the plugin. + // + // If the field is not provided when logging is enabled, it is set to + // `INFO` by default. + LogLevel min_log_level = 3 + [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; + } + + // Defines a resource that uses the `WasmPlugin` resource. + message UsedBy { + // Output only. Full name of the resource + // https://google.aip.dev/122#full-resource-names, for example + // `//networkservices.googleapis.com/projects/{project}/locations/{location}/lbRouteExtensions/{extension}` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. Name of the `WasmPlugin` resource in the following format: + // `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A human-readable description of the resource. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set of labels associated with the `WasmPlugin` resource. + // + // The format must comply with [the following + // requirements](/compute/docs/labeling-resources#requirements). + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the `WasmPluginVersion` resource that is the + // currently serving one. The version referred to must be a child of this + // `WasmPlugin` resource. + string main_version_id = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the logging options for the activity performed by this + // plugin. If logging is enabled, plugin logs are exported to + // Cloud Logging. + // Note that the settings relate to the logs generated by using + // logging statements in your Wasm code. + LogConfig log_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. All versions of this `WasmPlugin` resource in the key-value + // format. The key is the resource ID, and the value is the `VersionDetails` + // object. + // + // Lets you create or update a `WasmPlugin` resource and its versions in a + // single request. When the `main_version_id` field is not empty, it must + // point to one of the `VersionDetails` objects in the map. + // + // If provided in a `PATCH` request, the new versions replace the + // previous set. Any version omitted from the `versions` field is removed. + // Because the `WasmPluginVersion` resource is immutable, if a + // `WasmPluginVersion` resource with the same name already exists and differs, + // the request fails. + // + // Note: In a `GET` request, this field is populated only if the field + // `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. + map versions = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. List of all + // [extensions](https://cloud.google.com/service-extensions/docs/overview) + // that use this `WasmPlugin` resource. + repeated UsedBy used_by = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A single immutable version of a `WasmPlugin` resource. +// Defines the Wasm module used and optionally its runtime config. +message WasmPluginVersion { + option (google.api.resource) = { + type: "networkservices.googleapis.com/WasmPluginVersion" + pattern: "projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}" + }; + + oneof plugin_config_source { + // Configuration for the plugin. + // The configuration is provided to the plugin at runtime through + // the `ON_CONFIGURE` callback. When a new + // `WasmPluginVersion` resource is created, the digest of the + // contents is saved in the `plugin_config_digest` field. + bytes plugin_config_data = 12; + + // URI of the plugin configuration stored in the Artifact Registry. + // The configuration is provided to the plugin at runtime through + // the `ON_CONFIGURE` callback. The container image must contain + // only a single file with the name `plugin.config`. When a + // new `WasmPluginVersion` resource is created, the digest of the + // container image is saved in the `plugin_config_digest` field. + string plugin_config_uri = 13; + } + + // Identifier. Name of the `WasmPluginVersion` resource in the following + // format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}/ + // versions/{wasm_plugin_version}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A human-readable description of the resource. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set of labels associated with the `WasmPluginVersion` + // resource. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URI of the container image containing the plugin, stored in the + // Artifact Registry. + // When a new `WasmPluginVersion` resource is created, the digest + // of the container image is saved in the `image_digest` field. + // When downloading an image, the digest value is used instead of an + // image tag. + string image_uri = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The resolved digest for the image specified in the `image` + // field. The digest is resolved during the creation of `WasmPluginVersion` + // resource. This field holds the digest value, regardless of whether a tag or + // digest was originally specified in the `image` field. + string image_digest = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This field holds the digest (usually checksum) value for the + // plugin configuration. The value is calculated based on the contents of + // `plugin_config_data` or the container image defined by + // the `plugin_config_uri` field. + string plugin_config_digest = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request used with the `ListWasmPlugins` method. +message ListWasmPluginsRequest { + // Required. The project and location from which the `WasmPlugin` resources + // are listed, specified in the following format: + // `projects/{project}/locations/global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/WasmPlugin" + } + ]; + + // Maximum number of `WasmPlugin` resources to return per call. + // If not specified, at most 50 `WasmPlugin` resources are returned. + // The maximum value is 1000; values above 1000 are coerced to 1000. + int32 page_size = 2; + + // The value returned by the last `ListWasmPluginsResponse` call. + // Indicates that this is a continuation of a prior + // `ListWasmPlugins` call, and that the + // next page of data is to be returned. + string page_token = 3; +} + +// Response returned by the `ListWasmPlugins` method. +message ListWasmPluginsResponse { + // List of `WasmPlugin` resources. + repeated WasmPlugin wasm_plugins = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, + // call this method again using the value of `next_page_token` as + // `page_token`. + string next_page_token = 2; + + // Unreachable resources. Populated when the request attempts to list all + // resources across all supported locations, while some locations are + // temporarily unavailable. + repeated string unreachable = 3; +} + +// Request used by the `GetWasmPlugin` method. +message GetWasmPluginRequest { + // Required. A name of the `WasmPlugin` resource to get. Must be in the + // format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/WasmPlugin" + } + ]; + + // Determines how much data must be returned in the response. See + // [AIP-157](https://google.aip.dev/157). + WasmPluginView view = 2; +} + +// Request used by the `CreateWasmPlugin` method. +message CreateWasmPluginRequest { + // Required. The parent resource of the `WasmPlugin` resource. Must be in the + // format `projects/{project}/locations/global`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/WasmPlugin" + } + ]; + + // Required. User-provided ID of the `WasmPlugin` resource to be created. + string wasm_plugin_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. `WasmPlugin` resource to be created. + WasmPlugin wasm_plugin = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the `UpdateWasmPlugin` method. +message UpdateWasmPluginRequest { + // Optional. Used to specify the fields to be overwritten in the + // `WasmPlugin` resource by the update. + // The fields specified in the `update_mask` field are relative to the + // resource, not the full request. + // An omitted `update_mask` field is treated as an implied `update_mask` + // field equivalent to all fields that are populated (that have a non-empty + // value). + // The `update_mask` field supports a special value `*`, which means that + // each field in the given `WasmPlugin` resource (including the empty ones) + // replaces the current value. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Updated `WasmPlugin` resource. + WasmPlugin wasm_plugin = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the `DeleteWasmPlugin` method. +message DeleteWasmPluginRequest { + // Required. A name of the `WasmPlugin` resource to delete. Must be in the + // format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/WasmPlugin" + } + ]; +} + +// Request used with the `ListWasmPluginVersions` method. +message ListWasmPluginVersionsRequest { + // Required. The `WasmPlugin` resource whose `WasmPluginVersion`s + // are listed, specified in the following format: + // `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/WasmPluginVersion" + } + ]; + + // Maximum number of `WasmPluginVersion` resources to return per + // call. If not specified, at most 50 `WasmPluginVersion` resources are + // returned. The maximum value is 1000; values above 1000 are coerced to + // 1000. + int32 page_size = 2; + + // The value returned by the last `ListWasmPluginVersionsResponse` call. + // Indicates that this is a continuation of a prior + // `ListWasmPluginVersions` call, and that the + // next page of data is to be returned. + string page_token = 3; +} + +// Response returned by the `ListWasmPluginVersions` method. +message ListWasmPluginVersionsResponse { + // List of `WasmPluginVersion` resources. + repeated WasmPluginVersion wasm_plugin_versions = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, + // call this method again using the value of `next_page_token` as + // `page_token`. + string next_page_token = 2; + + // Unreachable resources. Populated when the request attempts to list all + // resources across all supported locations, while some locations are + // temporarily unavailable. + repeated string unreachable = 3; +} + +// Request used by the `GetWasmPluginVersion` method. +message GetWasmPluginVersionRequest { + // Required. A name of the `WasmPluginVersion` resource to get. Must be in + // the format + // `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/WasmPluginVersion" + } + ]; +} + +// Request used by the `CreateWasmPluginVersion` method. +message CreateWasmPluginVersionRequest { + // Required. The parent resource of the `WasmPluginVersion` resource. Must be + // in the format + // `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/WasmPluginVersion" + } + ]; + + // Required. User-provided ID of the `WasmPluginVersion` resource to be + // created. + string wasm_plugin_version_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. `WasmPluginVersion` resource to be created. + WasmPluginVersion wasm_plugin_version = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the `DeleteWasmPluginVersion` method. +message DeleteWasmPluginVersionRequest { + // Required. A name of the `WasmPluginVersion` resource to delete. Must be in + // the format + // `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/WasmPluginVersion" + } + ]; +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto index 862324829759..16e08a4d2068 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/cloud/networkservices/v1/common.proto"; import "google/cloud/networkservices/v1/endpoint_policy.proto"; +import "google/cloud/networkservices/v1/extensibility.proto"; import "google/cloud/networkservices/v1/gateway.proto"; import "google/cloud/networkservices/v1/grpc_route.proto"; import "google/cloud/networkservices/v1/http_route.proto"; @@ -30,6 +31,7 @@ import "google/cloud/networkservices/v1/service_lb_policy.proto"; import "google/cloud/networkservices/v1/tcp_route.proto"; import "google/cloud/networkservices/v1/tls_route.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; option csharp_namespace = "Google.Cloud.NetworkServices.V1"; option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb"; @@ -103,6 +105,114 @@ service NetworkServices { }; } + // Lists `WasmPluginVersion` resources in a given project and + // location. + rpc ListWasmPluginVersions(ListWasmPluginVersionsRequest) + returns (ListWasmPluginVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of the specified `WasmPluginVersion` resource. + rpc GetWasmPluginVersion(GetWasmPluginVersionRequest) + returns (WasmPluginVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new `WasmPluginVersion` resource in a given project + // and location. + rpc CreateWasmPluginVersion(CreateWasmPluginVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/wasmPlugins/*}/versions" + body: "wasm_plugin_version" + }; + option (google.api.method_signature) = + "parent,wasm_plugin_version,wasm_plugin_version_id"; + option (google.longrunning.operation_info) = { + response_type: "WasmPluginVersion" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Deletes the specified `WasmPluginVersion` resource. + rpc DeleteWasmPluginVersion(DeleteWasmPluginVersionRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/wasmPlugins/*/versions/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Lists `WasmPlugin` resources in a given project and + // location. + rpc ListWasmPlugins(ListWasmPluginsRequest) + returns (ListWasmPluginsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/wasmPlugins" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of the specified `WasmPlugin` resource. + rpc GetWasmPlugin(GetWasmPluginRequest) returns (WasmPlugin) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/wasmPlugins/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new `WasmPlugin` resource in a given project + // and location. + rpc CreateWasmPlugin(CreateWasmPluginRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/wasmPlugins" + body: "wasm_plugin" + }; + option (google.api.method_signature) = "parent,wasm_plugin,wasm_plugin_id"; + option (google.longrunning.operation_info) = { + response_type: "WasmPlugin" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Updates the parameters of the specified `WasmPlugin` resource. + rpc UpdateWasmPlugin(UpdateWasmPluginRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{wasm_plugin.name=projects/*/locations/*/wasmPlugins/*}" + body: "wasm_plugin" + }; + option (google.api.method_signature) = "wasm_plugin,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "WasmPlugin" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Deletes the specified `WasmPlugin` resource. + rpc DeleteWasmPlugin(DeleteWasmPluginRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/wasmPlugins/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + // Lists Gateways in a given project and location. rpc ListGateways(ListGatewaysRequest) returns (ListGatewaysResponse) { option (google.api.http) = { diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtension.java new file mode 100644 index 000000000000..60f9ef90760f --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtension.java @@ -0,0 +1,54 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_CreateAuthzExtension_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateAuthzExtension { + + public static void main(String[] args) throws Exception { + asyncCreateAuthzExtension(); + } + + public static void asyncCreateAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + CreateAuthzExtensionRequest request = + CreateAuthzExtensionRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAuthzExtensionId("authzExtensionId-973067640") + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + depServiceClient.createAuthzExtensionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_CreateAuthzExtension_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtensionLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtensionLRO.java new file mode 100644 index 000000000000..c704ff28af69 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/AsyncCreateAuthzExtensionLRO.java @@ -0,0 +1,54 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_CreateAuthzExtension_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.OperationMetadata; + +public class AsyncCreateAuthzExtensionLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAuthzExtensionLRO(); + } + + public static void asyncCreateAuthzExtensionLRO() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + CreateAuthzExtensionRequest request = + CreateAuthzExtensionRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAuthzExtensionId("authzExtensionId-973067640") + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + depServiceClient.createAuthzExtensionOperationCallable().futureCall(request); + // Do something. + AuthzExtension response = future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_CreateAuthzExtension_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtension.java new file mode 100644 index 000000000000..02cb00f1fc84 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtension.java @@ -0,0 +1,49 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_CreateAuthzExtension_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncCreateAuthzExtension { + + public static void main(String[] args) throws Exception { + syncCreateAuthzExtension(); + } + + public static void syncCreateAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + CreateAuthzExtensionRequest request = + CreateAuthzExtensionRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAuthzExtensionId("authzExtensionId-973067640") + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + AuthzExtension response = depServiceClient.createAuthzExtensionAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_DepService_CreateAuthzExtension_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionLocationnameAuthzextensionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionLocationnameAuthzextensionString.java new file mode 100644 index 000000000000..6cf02906c932 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionLocationnameAuthzextensionString.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_CreateAuthzExtension_LocationnameAuthzextensionString_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncCreateAuthzExtensionLocationnameAuthzextensionString { + + public static void main(String[] args) throws Exception { + syncCreateAuthzExtensionLocationnameAuthzextensionString(); + } + + public static void syncCreateAuthzExtensionLocationnameAuthzextensionString() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + AuthzExtension response = + depServiceClient + .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) + .get(); + } + } +} +// [END networkservices_v1_generated_DepService_CreateAuthzExtension_LocationnameAuthzextensionString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionStringAuthzextensionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionStringAuthzextensionString.java new file mode 100644 index 000000000000..4042479c0b6d --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/createauthzextension/SyncCreateAuthzExtensionStringAuthzextensionString.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_CreateAuthzExtension_StringAuthzextensionString_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncCreateAuthzExtensionStringAuthzextensionString { + + public static void main(String[] args) throws Exception { + syncCreateAuthzExtensionStringAuthzextensionString(); + } + + public static void syncCreateAuthzExtensionStringAuthzextensionString() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + String authzExtensionId = "authzExtensionId-973067640"; + AuthzExtension response = + depServiceClient + .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) + .get(); + } + } +} +// [END networkservices_v1_generated_DepService_CreateAuthzExtension_StringAuthzextensionString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtension.java new file mode 100644 index 000000000000..4dceb739cff4 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtension.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. + */ + +package com.google.cloud.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_DeleteAuthzExtension_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteAuthzExtension { + + public static void main(String[] args) throws Exception { + asyncDeleteAuthzExtension(); + } + + public static void asyncDeleteAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + DeleteAuthzExtensionRequest request = + DeleteAuthzExtensionRequest.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + depServiceClient.deleteAuthzExtensionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_DeleteAuthzExtension_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtensionLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtensionLRO.java new file mode 100644 index 000000000000..bee7c16968ec --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/AsyncDeleteAuthzExtensionLRO.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_DeleteAuthzExtension_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteAuthzExtensionLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAuthzExtensionLRO(); + } + + public static void asyncDeleteAuthzExtensionLRO() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + DeleteAuthzExtensionRequest request = + DeleteAuthzExtensionRequest.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + depServiceClient.deleteAuthzExtensionOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_DeleteAuthzExtension_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtension.java new file mode 100644 index 000000000000..dffb272d8091 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtension.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAuthzExtension { + + public static void main(String[] args) throws Exception { + syncDeleteAuthzExtension(); + } + + public static void syncDeleteAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + DeleteAuthzExtensionRequest request = + DeleteAuthzExtensionRequest.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .setRequestId("requestId693933066") + .build(); + depServiceClient.deleteAuthzExtensionAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_DepService_DeleteAuthzExtension_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionAuthzextensionname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionAuthzextensionname.java new file mode 100644 index 000000000000..46f4a3131c03 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionAuthzextensionname.java @@ -0,0 +1,43 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_DeleteAuthzExtension_Authzextensionname_sync] +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAuthzExtensionAuthzextensionname { + + public static void main(String[] args) throws Exception { + syncDeleteAuthzExtensionAuthzextensionname(); + } + + public static void syncDeleteAuthzExtensionAuthzextensionname() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + depServiceClient.deleteAuthzExtensionAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_DepService_DeleteAuthzExtension_Authzextensionname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionString.java new file mode 100644 index 000000000000..3a8390245b67 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/deleteauthzextension/SyncDeleteAuthzExtensionString.java @@ -0,0 +1,43 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_DeleteAuthzExtension_String_sync] +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAuthzExtensionString { + + public static void main(String[] args) throws Exception { + syncDeleteAuthzExtensionString(); + } + + public static void syncDeleteAuthzExtensionString() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + String name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString(); + depServiceClient.deleteAuthzExtensionAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_DepService_DeleteAuthzExtension_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/AsyncGetAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/AsyncGetAuthzExtension.java new file mode 100644 index 000000000000..b91df0735793 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/AsyncGetAuthzExtension.java @@ -0,0 +1,51 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_GetAuthzExtension_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; + +public class AsyncGetAuthzExtension { + + public static void main(String[] args) throws Exception { + asyncGetAuthzExtension(); + } + + public static void asyncGetAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + GetAuthzExtensionRequest request = + GetAuthzExtensionRequest.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .build(); + ApiFuture future = + depServiceClient.getAuthzExtensionCallable().futureCall(request); + // Do something. + AuthzExtension response = future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_GetAuthzExtension_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtension.java new file mode 100644 index 000000000000..a633a1272cf0 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtension.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_GetAuthzExtension_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.GetAuthzExtensionRequest; + +public class SyncGetAuthzExtension { + + public static void main(String[] args) throws Exception { + syncGetAuthzExtension(); + } + + public static void syncGetAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + GetAuthzExtensionRequest request = + GetAuthzExtensionRequest.newBuilder() + .setName( + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) + .build(); + AuthzExtension response = depServiceClient.getAuthzExtension(request); + } + } +} +// [END networkservices_v1_generated_DepService_GetAuthzExtension_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionAuthzextensionname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionAuthzextensionname.java new file mode 100644 index 000000000000..dd57dd1f86c2 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionAuthzextensionname.java @@ -0,0 +1,43 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_GetAuthzExtension_Authzextensionname_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; + +public class SyncGetAuthzExtensionAuthzextensionname { + + public static void main(String[] args) throws Exception { + syncGetAuthzExtensionAuthzextensionname(); + } + + public static void syncGetAuthzExtensionAuthzextensionname() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + AuthzExtensionName name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); + AuthzExtension response = depServiceClient.getAuthzExtension(name); + } + } +} +// [END networkservices_v1_generated_DepService_GetAuthzExtension_Authzextensionname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionString.java new file mode 100644 index 000000000000..a5912d6e9ba0 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/getauthzextension/SyncGetAuthzExtensionString.java @@ -0,0 +1,43 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_GetAuthzExtension_String_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.AuthzExtensionName; +import com.google.cloud.networkservices.v1.DepServiceClient; + +public class SyncGetAuthzExtensionString { + + public static void main(String[] args) throws Exception { + syncGetAuthzExtensionString(); + } + + public static void syncGetAuthzExtensionString() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + String name = + AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString(); + AuthzExtension response = depServiceClient.getAuthzExtension(name); + } + } +} +// [END networkservices_v1_generated_DepService_GetAuthzExtension_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensions.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensions.java new file mode 100644 index 000000000000..fd2e8c1fe665 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensions.java @@ -0,0 +1,56 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_ListAuthzExtensions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.LocationName; + +public class AsyncListAuthzExtensions { + + public static void main(String[] args) throws Exception { + asyncListAuthzExtensions(); + } + + public static void asyncListAuthzExtensions() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + ListAuthzExtensionsRequest request = + ListAuthzExtensionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + depServiceClient.listAuthzExtensionsPagedCallable().futureCall(request); + // Do something. + for (AuthzExtension element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_DepService_ListAuthzExtensions_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensionsPaged.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensionsPaged.java new file mode 100644 index 000000000000..73698b3b2221 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/AsyncListAuthzExtensionsPaged.java @@ -0,0 +1,64 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_ListAuthzExtensions_Paged_async] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsResponse; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListAuthzExtensionsPaged { + + public static void main(String[] args) throws Exception { + asyncListAuthzExtensionsPaged(); + } + + public static void asyncListAuthzExtensionsPaged() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + ListAuthzExtensionsRequest request = + ListAuthzExtensionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAuthzExtensionsResponse response = + depServiceClient.listAuthzExtensionsCallable().call(request); + for (AuthzExtension element : response.getAuthzExtensionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkservices_v1_generated_DepService_ListAuthzExtensions_Paged_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensions.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensions.java new file mode 100644 index 000000000000..f41ecc8d93cc --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensions.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. + */ + +package com.google.cloud.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_ListAuthzExtensions_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncListAuthzExtensions { + + public static void main(String[] args) throws Exception { + syncListAuthzExtensions(); + } + + public static void syncListAuthzExtensions() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + ListAuthzExtensionsRequest request = + ListAuthzExtensionsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AuthzExtension element : depServiceClient.listAuthzExtensions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_DepService_ListAuthzExtensions_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsLocationname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsLocationname.java new file mode 100644 index 000000000000..9f7736d5ef3b --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsLocationname.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_ListAuthzExtensions_Locationname_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncListAuthzExtensionsLocationname { + + public static void main(String[] args) throws Exception { + syncListAuthzExtensionsLocationname(); + } + + public static void syncListAuthzExtensionsLocationname() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_DepService_ListAuthzExtensions_Locationname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsString.java new file mode 100644 index 000000000000..1bbb75d6e707 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/listauthzextensions/SyncListAuthzExtensionsString.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_ListAuthzExtensions_String_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.LocationName; + +public class SyncListAuthzExtensionsString { + + public static void main(String[] args) throws Exception { + syncListAuthzExtensionsString(); + } + + public static void syncListAuthzExtensionsString() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_DepService_ListAuthzExtensions_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtension.java new file mode 100644 index 000000000000..51efe8db1a34 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtension.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_UpdateAuthzExtension_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAuthzExtension { + + public static void main(String[] args) throws Exception { + asyncUpdateAuthzExtension(); + } + + public static void asyncUpdateAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + UpdateAuthzExtensionRequest request = + UpdateAuthzExtensionRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + ApiFuture future = + depServiceClient.updateAuthzExtensionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_UpdateAuthzExtension_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtensionLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtensionLRO.java new file mode 100644 index 000000000000..f4849006e9fc --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/AsyncUpdateAuthzExtensionLRO.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_UpdateAuthzExtension_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAuthzExtensionLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAuthzExtensionLRO(); + } + + public static void asyncUpdateAuthzExtensionLRO() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + UpdateAuthzExtensionRequest request = + UpdateAuthzExtensionRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + OperationFuture future = + depServiceClient.updateAuthzExtensionOperationCallable().futureCall(request); + // Do something. + AuthzExtension response = future.get(); + } + } +} +// [END networkservices_v1_generated_DepService_UpdateAuthzExtension_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtension.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtension.java new file mode 100644 index 000000000000..350263a7159f --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtension.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAuthzExtension { + + public static void main(String[] args) throws Exception { + syncUpdateAuthzExtension(); + } + + public static void syncUpdateAuthzExtension() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + UpdateAuthzExtensionRequest request = + UpdateAuthzExtensionRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAuthzExtension(AuthzExtension.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + AuthzExtension response = depServiceClient.updateAuthzExtensionAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_DepService_UpdateAuthzExtension_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtensionAuthzextensionFieldmask.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtensionAuthzextensionFieldmask.java new file mode 100644 index 000000000000..975c634a59b3 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/depservice/updateauthzextension/SyncUpdateAuthzExtensionAuthzextensionFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_DepService_UpdateAuthzExtension_AuthzextensionFieldmask_sync] +import com.google.cloud.networkservices.v1.AuthzExtension; +import com.google.cloud.networkservices.v1.DepServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAuthzExtensionAuthzextensionFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAuthzExtensionAuthzextensionFieldmask(); + } + + public static void syncUpdateAuthzExtensionAuthzextensionFieldmask() throws Exception { + // 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 (DepServiceClient depServiceClient = DepServiceClient.create()) { + AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AuthzExtension response = + depServiceClient.updateAuthzExtensionAsync(authzExtension, updateMask).get(); + } + } +} +// [END networkservices_v1_generated_DepService_UpdateAuthzExtension_AuthzextensionFieldmask_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPlugin.java new file mode 100644 index 000000000000..87437324e074 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPlugin.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPlugin_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.longrunning.Operation; + +public class AsyncCreateWasmPlugin { + + public static void main(String[] args) throws Exception { + asyncCreateWasmPlugin(); + } + + public static void asyncCreateWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginRequest request = + CreateWasmPluginRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setWasmPluginId("wasmPluginId1902086770") + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + ApiFuture future = + networkServicesClient.createWasmPluginCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPluginLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPluginLRO.java new file mode 100644 index 000000000000..dc9b5ac7d082 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/AsyncCreateWasmPluginLRO.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPlugin_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class AsyncCreateWasmPluginLRO { + + public static void main(String[] args) throws Exception { + asyncCreateWasmPluginLRO(); + } + + public static void asyncCreateWasmPluginLRO() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginRequest request = + CreateWasmPluginRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setWasmPluginId("wasmPluginId1902086770") + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + OperationFuture future = + networkServicesClient.createWasmPluginOperationCallable().futureCall(request); + // Do something. + WasmPlugin response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPlugin.java new file mode 100644 index 000000000000..cb5c15c2d42b --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPlugin.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] +import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncCreateWasmPlugin { + + public static void main(String[] args) throws Exception { + syncCreateWasmPlugin(); + } + + public static void syncCreateWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginRequest request = + CreateWasmPluginRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setWasmPluginId("wasmPluginId1902086770") + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + WasmPlugin response = networkServicesClient.createWasmPluginAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginLocationnameWasmpluginString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginLocationnameWasmpluginString.java new file mode 100644 index 000000000000..f1264bf9392f --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginLocationnameWasmpluginString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPlugin_LocationnameWasmpluginString_sync] +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncCreateWasmPluginLocationnameWasmpluginString { + + public static void main(String[] args) throws Exception { + syncCreateWasmPluginLocationnameWasmpluginString(); + } + + public static void syncCreateWasmPluginLocationnameWasmpluginString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + WasmPlugin response = + networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_LocationnameWasmpluginString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginStringWasmpluginString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginStringWasmpluginString.java new file mode 100644 index 000000000000..c6ae916fc55c --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmplugin/SyncCreateWasmPluginStringWasmpluginString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPlugin_StringWasmpluginString_sync] +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncCreateWasmPluginStringWasmpluginString { + + public static void main(String[] args) throws Exception { + syncCreateWasmPluginStringWasmpluginString(); + } + + public static void syncCreateWasmPluginStringWasmpluginString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + String wasmPluginId = "wasmPluginId1902086770"; + WasmPlugin response = + networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPlugin_StringWasmpluginString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersion.java new file mode 100644 index 000000000000..63fa32d19a91 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersion.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.longrunning.Operation; + +public class AsyncCreateWasmPluginVersion { + + public static void main(String[] args) throws Exception { + asyncCreateWasmPluginVersion(); + } + + public static void asyncCreateWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginVersionRequest request = + CreateWasmPluginVersionRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setWasmPluginVersionId("wasmPluginVersionId38892252") + .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) + .build(); + ApiFuture future = + networkServicesClient.createWasmPluginVersionCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersionLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersionLRO.java new file mode 100644 index 000000000000..4344a498760e --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/AsyncCreateWasmPluginVersionLRO.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class AsyncCreateWasmPluginVersionLRO { + + public static void main(String[] args) throws Exception { + asyncCreateWasmPluginVersionLRO(); + } + + public static void asyncCreateWasmPluginVersionLRO() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginVersionRequest request = + CreateWasmPluginVersionRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setWasmPluginVersionId("wasmPluginVersionId38892252") + .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) + .build(); + OperationFuture future = + networkServicesClient.createWasmPluginVersionOperationCallable().futureCall(request); + // Do something. + WasmPluginVersion response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersion.java new file mode 100644 index 000000000000..174c5d5e440d --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersion.java @@ -0,0 +1,49 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] +import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncCreateWasmPluginVersion { + + public static void main(String[] args) throws Exception { + syncCreateWasmPluginVersion(); + } + + public static void syncCreateWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateWasmPluginVersionRequest request = + CreateWasmPluginVersionRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setWasmPluginVersionId("wasmPluginVersionId38892252") + .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) + .build(); + WasmPluginVersion response = + networkServicesClient.createWasmPluginVersionAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionStringWasmpluginversionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionStringWasmpluginversionString.java new file mode 100644 index 000000000000..9ae14897d601 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionStringWasmpluginversionString.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_StringWasmpluginversionString_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncCreateWasmPluginVersionStringWasmpluginversionString { + + public static void main(String[] args) throws Exception { + syncCreateWasmPluginVersionStringWasmpluginversionString(); + } + + public static void syncCreateWasmPluginVersionStringWasmpluginversionString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + WasmPluginVersion response = + networkServicesClient + .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId) + .get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_StringWasmpluginversionString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString.java new file mode 100644 index 000000000000..d7381ba6e201 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createwasmpluginversion/SyncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_WasmpluginnameWasmpluginversionString_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString { + + public static void main(String[] args) throws Exception { + syncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString(); + } + + public static void syncCreateWasmPluginVersionWasmpluginnameWasmpluginversionString() + throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); + String wasmPluginVersionId = "wasmPluginVersionId38892252"; + WasmPluginVersion response = + networkServicesClient + .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId) + .get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateWasmPluginVersion_WasmpluginnameWasmpluginversionString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPlugin.java new file mode 100644 index 000000000000..82db52c0f1b3 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPlugin.java @@ -0,0 +1,50 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.longrunning.Operation; + +public class AsyncDeleteWasmPlugin { + + public static void main(String[] args) throws Exception { + asyncDeleteWasmPlugin(); + } + + public static void asyncDeleteWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginRequest request = + DeleteWasmPluginRequest.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .build(); + ApiFuture future = + networkServicesClient.deleteWasmPluginCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPluginLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPluginLRO.java new file mode 100644 index 000000000000..6dd1de79cd02 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/AsyncDeleteWasmPluginLRO.java @@ -0,0 +1,51 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.protobuf.Empty; + +public class AsyncDeleteWasmPluginLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteWasmPluginLRO(); + } + + public static void asyncDeleteWasmPluginLRO() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginRequest request = + DeleteWasmPluginRequest.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .build(); + OperationFuture future = + networkServicesClient.deleteWasmPluginOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPlugin.java new file mode 100644 index 000000000000..e4369084cfb2 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPlugin.java @@ -0,0 +1,46 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] +import com.google.cloud.networkservices.v1.DeleteWasmPluginRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPlugin { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPlugin(); + } + + public static void syncDeleteWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginRequest request = + DeleteWasmPluginRequest.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .build(); + networkServicesClient.deleteWasmPluginAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginString.java new file mode 100644 index 000000000000..ab848e84dca5 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginString.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_String_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPluginString { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPluginString(); + } + + public static void syncDeleteWasmPluginString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + networkServicesClient.deleteWasmPluginAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginWasmpluginname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginWasmpluginname.java new file mode 100644 index 000000000000..8170901a6f3c --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmplugin/SyncDeleteWasmPluginWasmpluginname.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_Wasmpluginname_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPluginWasmpluginname { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPluginWasmpluginname(); + } + + public static void syncDeleteWasmPluginWasmpluginname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + networkServicesClient.deleteWasmPluginAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPlugin_Wasmpluginname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersion.java new file mode 100644 index 000000000000..dca0b8405039 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersion.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; +import com.google.longrunning.Operation; + +public class AsyncDeleteWasmPluginVersion { + + public static void main(String[] args) throws Exception { + asyncDeleteWasmPluginVersion(); + } + + public static void asyncDeleteWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginVersionRequest request = + DeleteWasmPluginVersionRequest.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .build(); + ApiFuture future = + networkServicesClient.deleteWasmPluginVersionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersionLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersionLRO.java new file mode 100644 index 000000000000..de3735daa803 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/AsyncDeleteWasmPluginVersionLRO.java @@ -0,0 +1,54 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; +import com.google.protobuf.Empty; + +public class AsyncDeleteWasmPluginVersionLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteWasmPluginVersionLRO(); + } + + public static void asyncDeleteWasmPluginVersionLRO() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginVersionRequest request = + DeleteWasmPluginVersionRequest.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .build(); + OperationFuture future = + networkServicesClient.deleteWasmPluginVersionOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersion.java new file mode 100644 index 000000000000..fae32473a681 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersion.java @@ -0,0 +1,49 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] +import com.google.cloud.networkservices.v1.DeleteWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPluginVersion { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPluginVersion(); + } + + public static void syncDeleteWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteWasmPluginVersionRequest request = + DeleteWasmPluginVersionRequest.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .build(); + networkServicesClient.deleteWasmPluginVersionAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionString.java new file mode 100644 index 000000000000..ef18a901d820 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_String_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPluginVersionString { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPluginVersionString(); + } + + public static void syncDeleteWasmPluginVersionString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString(); + networkServicesClient.deleteWasmPluginVersionAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionWasmpluginversionname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionWasmpluginversionname.java new file mode 100644 index 000000000000..c6efc9d67d99 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deletewasmpluginversion/SyncDeleteWasmPluginVersionWasmpluginversionname.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_Wasmpluginversionname_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; +import com.google.protobuf.Empty; + +public class SyncDeleteWasmPluginVersionWasmpluginversionname { + + public static void main(String[] args) throws Exception { + syncDeleteWasmPluginVersionWasmpluginversionname(); + } + + public static void syncDeleteWasmPluginVersionWasmpluginversionname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + networkServicesClient.deleteWasmPluginVersionAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteWasmPluginVersion_Wasmpluginversionname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/AsyncGetWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/AsyncGetWasmPlugin.java new file mode 100644 index 000000000000..545a8d4d494c --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/AsyncGetWasmPlugin.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. + */ + +package com.google.cloud.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPlugin_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginView; + +public class AsyncGetWasmPlugin { + + public static void main(String[] args) throws Exception { + asyncGetWasmPlugin(); + } + + public static void asyncGetWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetWasmPluginRequest request = + GetWasmPluginRequest.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setView(WasmPluginView.forNumber(0)) + .build(); + ApiFuture future = + networkServicesClient.getWasmPluginCallable().futureCall(request); + // Do something. + WasmPlugin response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPlugin.java new file mode 100644 index 000000000000..8ce1d315b203 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPlugin.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] +import com.google.cloud.networkservices.v1.GetWasmPluginRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginView; + +public class SyncGetWasmPlugin { + + public static void main(String[] args) throws Exception { + syncGetWasmPlugin(); + } + + public static void syncGetWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetWasmPluginRequest request = + GetWasmPluginRequest.newBuilder() + .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setView(WasmPluginView.forNumber(0)) + .build(); + WasmPlugin response = networkServicesClient.getWasmPlugin(request); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginString.java new file mode 100644 index 000000000000..4ee8d1e20d90 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginString.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPlugin_String_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginName; + +public class SyncGetWasmPluginString { + + public static void main(String[] args) throws Exception { + syncGetWasmPluginString(); + } + + public static void syncGetWasmPluginString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + WasmPlugin response = networkServicesClient.getWasmPlugin(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginWasmpluginname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginWasmpluginname.java new file mode 100644 index 000000000000..6317ba003ad3 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmplugin/SyncGetWasmPluginWasmpluginname.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPlugin_Wasmpluginname_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.cloud.networkservices.v1.WasmPluginName; + +public class SyncGetWasmPluginWasmpluginname { + + public static void main(String[] args) throws Exception { + syncGetWasmPluginWasmpluginname(); + } + + public static void syncGetWasmPluginWasmpluginname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + WasmPlugin response = networkServicesClient.getWasmPlugin(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPlugin_Wasmpluginname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/AsyncGetWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/AsyncGetWasmPluginVersion.java new file mode 100644 index 000000000000..a9e01bdd9c4f --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/AsyncGetWasmPluginVersion.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; + +public class AsyncGetWasmPluginVersion { + + public static void main(String[] args) throws Exception { + asyncGetWasmPluginVersion(); + } + + public static void asyncGetWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetWasmPluginVersionRequest request = + GetWasmPluginVersionRequest.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .build(); + ApiFuture future = + networkServicesClient.getWasmPluginVersionCallable().futureCall(request); + // Do something. + WasmPluginVersion response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersion.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersion.java new file mode 100644 index 000000000000..5ac9f31165bf --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersion.java @@ -0,0 +1,49 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] +import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; + +public class SyncGetWasmPluginVersion { + + public static void main(String[] args) throws Exception { + syncGetWasmPluginVersion(); + } + + public static void syncGetWasmPluginVersion() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetWasmPluginVersionRequest request = + GetWasmPluginVersionRequest.newBuilder() + .setName( + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString()) + .build(); + WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(request); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionString.java new file mode 100644 index 000000000000..98c24b47859b --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_String_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; + +public class SyncGetWasmPluginVersionString { + + public static void main(String[] args) throws Exception { + syncGetWasmPluginVersionString(); + } + + public static void syncGetWasmPluginVersionString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") + .toString(); + WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionWasmpluginversionname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionWasmpluginversionname.java new file mode 100644 index 000000000000..2320f0fe079c --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getwasmpluginversion/SyncGetWasmPluginVersionWasmpluginversionname.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_Wasmpluginversionname_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.cloud.networkservices.v1.WasmPluginVersionName; + +public class SyncGetWasmPluginVersionWasmpluginversionname { + + public static void main(String[] args) throws Exception { + syncGetWasmPluginVersionWasmpluginversionname(); + } + + public static void syncGetWasmPluginVersionWasmpluginversionname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginVersionName name = + WasmPluginVersionName.of( + "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); + WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetWasmPluginVersion_Wasmpluginversionname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPlugins.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPlugins.java new file mode 100644 index 000000000000..c46631a4f267 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPlugins.java @@ -0,0 +1,54 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPlugins_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class AsyncListWasmPlugins { + + public static void main(String[] args) throws Exception { + asyncListWasmPlugins(); + } + + public static void asyncListWasmPlugins() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginsRequest request = + ListWasmPluginsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + networkServicesClient.listWasmPluginsPagedCallable().futureCall(request); + // Do something. + for (WasmPlugin element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPluginsPaged.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPluginsPaged.java new file mode 100644 index 000000000000..55c1ffb91476 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/AsyncListWasmPluginsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPlugins_Paged_async] +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginsResponse; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.common.base.Strings; + +public class AsyncListWasmPluginsPaged { + + public static void main(String[] args) throws Exception { + asyncListWasmPluginsPaged(); + } + + public static void asyncListWasmPluginsPaged() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginsRequest request = + ListWasmPluginsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListWasmPluginsResponse response = + networkServicesClient.listWasmPluginsCallable().call(request); + for (WasmPlugin element : response.getWasmPluginsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_Paged_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPlugins.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPlugins.java new file mode 100644 index 000000000000..2d4a505b7606 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPlugins.java @@ -0,0 +1,50 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] +import com.google.cloud.networkservices.v1.ListWasmPluginsRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncListWasmPlugins { + + public static void main(String[] args) throws Exception { + syncListWasmPlugins(); + } + + public static void syncListWasmPlugins() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginsRequest request = + ListWasmPluginsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (WasmPlugin element : networkServicesClient.listWasmPlugins(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsLocationname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsLocationname.java new file mode 100644 index 000000000000..0b3c4275a7ed --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsLocationname.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPlugins_Locationname_sync] +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncListWasmPluginsLocationname { + + public static void main(String[] args) throws Exception { + syncListWasmPluginsLocationname(); + } + + public static void syncListWasmPluginsLocationname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_Locationname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsString.java new file mode 100644 index 000000000000..2fba3918399c --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmplugins/SyncListWasmPluginsString.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPlugins_String_sync] +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; + +public class SyncListWasmPluginsString { + + public static void main(String[] args) throws Exception { + syncListWasmPluginsString(); + } + + public static void syncListWasmPluginsString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPlugins_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersions.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersions.java new file mode 100644 index 000000000000..bdd029ea949f --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersions.java @@ -0,0 +1,54 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class AsyncListWasmPluginVersions { + + public static void main(String[] args) throws Exception { + asyncListWasmPluginVersions(); + } + + public static void asyncListWasmPluginVersions() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginVersionsRequest request = + ListWasmPluginVersionsRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + networkServicesClient.listWasmPluginVersionsPagedCallable().futureCall(request); + // Do something. + for (WasmPluginVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersionsPaged.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersionsPaged.java new file mode 100644 index 000000000000..9a3850eedab9 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/AsyncListWasmPluginVersionsPaged.java @@ -0,0 +1,62 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_Paged_async] +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsResponse; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; +import com.google.common.base.Strings; + +public class AsyncListWasmPluginVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListWasmPluginVersionsPaged(); + } + + public static void asyncListWasmPluginVersionsPaged() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginVersionsRequest request = + ListWasmPluginVersionsRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListWasmPluginVersionsResponse response = + networkServicesClient.listWasmPluginVersionsCallable().call(request); + for (WasmPluginVersion element : response.getWasmPluginVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_Paged_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersions.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersions.java new file mode 100644 index 000000000000..52b7fff92900 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersions.java @@ -0,0 +1,51 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] +import com.google.cloud.networkservices.v1.ListWasmPluginVersionsRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncListWasmPluginVersions { + + public static void main(String[] args) throws Exception { + syncListWasmPluginVersions(); + } + + public static void syncListWasmPluginVersions() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListWasmPluginVersionsRequest request = + ListWasmPluginVersionsRequest.newBuilder() + .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (WasmPluginVersion element : + networkServicesClient.listWasmPluginVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsString.java new file mode 100644 index 000000000000..92672731b8e7 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_String_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncListWasmPluginVersionsString { + + public static void main(String[] args) throws Exception { + syncListWasmPluginVersionsString(); + } + + public static void syncListWasmPluginVersionsString() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); + for (WasmPluginVersion element : + networkServicesClient.listWasmPluginVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsWasmpluginname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsWasmpluginname.java new file mode 100644 index 000000000000..5ed059d63acb --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listwasmpluginversions/SyncListWasmPluginVersionsWasmpluginname.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_Wasmpluginname_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPluginName; +import com.google.cloud.networkservices.v1.WasmPluginVersion; + +public class SyncListWasmPluginVersionsWasmpluginname { + + public static void main(String[] args) throws Exception { + syncListWasmPluginVersionsWasmpluginname(); + } + + public static void syncListWasmPluginVersionsWasmpluginname() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); + for (WasmPluginVersion element : + networkServicesClient.listWasmPluginVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListWasmPluginVersions_Wasmpluginname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPlugin.java new file mode 100644 index 000000000000..e09dd4f69117 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPlugin.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. + */ + +package com.google.cloud.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateWasmPlugin { + + public static void main(String[] args) throws Exception { + asyncUpdateWasmPlugin(); + } + + public static void asyncUpdateWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateWasmPluginRequest request = + UpdateWasmPluginRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + ApiFuture future = + networkServicesClient.updateWasmPluginCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPluginLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPluginLRO.java new file mode 100644 index 000000000000..d3c8e85d5a2d --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/AsyncUpdateWasmPluginLRO.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. + */ + +package com.google.cloud.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateWasmPluginLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateWasmPluginLRO(); + } + + public static void asyncUpdateWasmPluginLRO() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateWasmPluginRequest request = + UpdateWasmPluginRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + OperationFuture future = + networkServicesClient.updateWasmPluginOperationCallable().futureCall(request); + // Do something. + WasmPlugin response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPlugin.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPlugin.java new file mode 100644 index 000000000000..327f02422741 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPlugin.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.UpdateWasmPluginRequest; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.protobuf.FieldMask; + +public class SyncUpdateWasmPlugin { + + public static void main(String[] args) throws Exception { + syncUpdateWasmPlugin(); + } + + public static void syncUpdateWasmPlugin() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateWasmPluginRequest request = + UpdateWasmPluginRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setWasmPlugin(WasmPlugin.newBuilder().build()) + .build(); + WasmPlugin response = networkServicesClient.updateWasmPluginAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPluginWasmpluginFieldmask.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPluginWasmpluginFieldmask.java new file mode 100644 index 000000000000..7dfbcdd0adff --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updatewasmplugin/SyncUpdateWasmPluginWasmpluginFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_WasmpluginFieldmask_sync] +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.WasmPlugin; +import com.google.protobuf.FieldMask; + +public class SyncUpdateWasmPluginWasmpluginFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateWasmPluginWasmpluginFieldmask(); + } + + public static void syncUpdateWasmPluginWasmpluginFieldmask() throws Exception { + // 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + WasmPlugin response = + networkServicesClient.updateWasmPluginAsync(wasmPlugin, updateMask).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateWasmPlugin_WasmpluginFieldmask_sync] diff --git a/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java b/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java index 5beeedf4a2df..c0206a68a274 100644 --- a/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java +++ b/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequest.java @@ -167,7 +167,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
    * Optional. The ISO-639 language code of the input document if known, for
    * example, "en-US" or "sr-Latn". Supported language codes are listed in
-   * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+   * [Language Support](https://cloud.google.com/translate/docs/languages). If
    * the source language isn't specified, the API attempts to identify the
    * source language automatically and returns the source language within the
    * response. Source language must be specified if the request contains a
@@ -197,7 +197,7 @@ public java.lang.String getSourceLanguageCode() {
    * 
    * Optional. The ISO-639 language code of the input document if known, for
    * example, "en-US" or "sr-Latn". Supported language codes are listed in
-   * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+   * [Language Support](https://cloud.google.com/translate/docs/languages). If
    * the source language isn't specified, the API attempts to identify the
    * source language automatically and returns the source language within the
    * response. Source language must be specified if the request contains a
@@ -231,8 +231,8 @@ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
    *
    * 
    * Required. The ISO-639 language code to use for translation of the input
-   * document, set to one of the language codes listed in [Language Support]
-   * (https://cloud.google.com/translate/docs/languages).
+   * document, set to one of the language codes listed in [Language
+   * Support](https://cloud.google.com/translate/docs/languages).
    * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -257,8 +257,8 @@ public java.lang.String getTargetLanguageCode() { * *
    * Required. The ISO-639 language code to use for translation of the input
-   * document, set to one of the language codes listed in [Language Support]
-   * (https://cloud.google.com/translate/docs/languages).
+   * document, set to one of the language codes listed in [Language
+   * Support](https://cloud.google.com/translate/docs/languages).
    * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1673,7 +1673,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { *
      * Optional. The ISO-639 language code of the input document if known, for
      * example, "en-US" or "sr-Latn". Supported language codes are listed in
-     * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+     * [Language Support](https://cloud.google.com/translate/docs/languages). If
      * the source language isn't specified, the API attempts to identify the
      * source language automatically and returns the source language within the
      * response. Source language must be specified if the request contains a
@@ -1702,7 +1702,7 @@ public java.lang.String getSourceLanguageCode() {
      * 
      * Optional. The ISO-639 language code of the input document if known, for
      * example, "en-US" or "sr-Latn". Supported language codes are listed in
-     * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+     * [Language Support](https://cloud.google.com/translate/docs/languages). If
      * the source language isn't specified, the API attempts to identify the
      * source language automatically and returns the source language within the
      * response. Source language must be specified if the request contains a
@@ -1731,7 +1731,7 @@ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() {
      * 
      * Optional. The ISO-639 language code of the input document if known, for
      * example, "en-US" or "sr-Latn". Supported language codes are listed in
-     * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+     * [Language Support](https://cloud.google.com/translate/docs/languages). If
      * the source language isn't specified, the API attempts to identify the
      * source language automatically and returns the source language within the
      * response. Source language must be specified if the request contains a
@@ -1759,7 +1759,7 @@ public Builder setSourceLanguageCode(java.lang.String value) {
      * 
      * Optional. The ISO-639 language code of the input document if known, for
      * example, "en-US" or "sr-Latn". Supported language codes are listed in
-     * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+     * [Language Support](https://cloud.google.com/translate/docs/languages). If
      * the source language isn't specified, the API attempts to identify the
      * source language automatically and returns the source language within the
      * response. Source language must be specified if the request contains a
@@ -1783,7 +1783,7 @@ public Builder clearSourceLanguageCode() {
      * 
      * Optional. The ISO-639 language code of the input document if known, for
      * example, "en-US" or "sr-Latn". Supported language codes are listed in
-     * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+     * [Language Support](https://cloud.google.com/translate/docs/languages). If
      * the source language isn't specified, the API attempts to identify the
      * source language automatically and returns the source language within the
      * response. Source language must be specified if the request contains a
@@ -1813,8 +1813,8 @@ public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
      *
      * 
      * Required. The ISO-639 language code to use for translation of the input
-     * document, set to one of the language codes listed in [Language Support]
-     * (https://cloud.google.com/translate/docs/languages).
+     * document, set to one of the language codes listed in [Language
+     * Support](https://cloud.google.com/translate/docs/languages).
      * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1838,8 +1838,8 @@ public java.lang.String getTargetLanguageCode() { * *
      * Required. The ISO-639 language code to use for translation of the input
-     * document, set to one of the language codes listed in [Language Support]
-     * (https://cloud.google.com/translate/docs/languages).
+     * document, set to one of the language codes listed in [Language
+     * Support](https://cloud.google.com/translate/docs/languages).
      * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1863,8 +1863,8 @@ public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { * *
      * Required. The ISO-639 language code to use for translation of the input
-     * document, set to one of the language codes listed in [Language Support]
-     * (https://cloud.google.com/translate/docs/languages).
+     * document, set to one of the language codes listed in [Language
+     * Support](https://cloud.google.com/translate/docs/languages).
      * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1887,8 +1887,8 @@ public Builder setTargetLanguageCode(java.lang.String value) { * *
      * Required. The ISO-639 language code to use for translation of the input
-     * document, set to one of the language codes listed in [Language Support]
-     * (https://cloud.google.com/translate/docs/languages).
+     * document, set to one of the language codes listed in [Language
+     * Support](https://cloud.google.com/translate/docs/languages).
      * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -1907,8 +1907,8 @@ public Builder clearTargetLanguageCode() { * *
      * Required. The ISO-639 language code to use for translation of the input
-     * document, set to one of the language codes listed in [Language Support]
-     * (https://cloud.google.com/translate/docs/languages).
+     * document, set to one of the language codes listed in [Language
+     * Support](https://cloud.google.com/translate/docs/languages).
      * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequestOrBuilder.java b/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequestOrBuilder.java index f892f9f0a396..222c7c849b28 100644 --- a/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequestOrBuilder.java +++ b/java-translate/proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/TranslateDocumentRequestOrBuilder.java @@ -78,7 +78,7 @@ public interface TranslateDocumentRequestOrBuilder *
    * Optional. The ISO-639 language code of the input document if known, for
    * example, "en-US" or "sr-Latn". Supported language codes are listed in
-   * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+   * [Language Support](https://cloud.google.com/translate/docs/languages). If
    * the source language isn't specified, the API attempts to identify the
    * source language automatically and returns the source language within the
    * response. Source language must be specified if the request contains a
@@ -97,7 +97,7 @@ public interface TranslateDocumentRequestOrBuilder
    * 
    * Optional. The ISO-639 language code of the input document if known, for
    * example, "en-US" or "sr-Latn". Supported language codes are listed in
-   * [Language Support] (https://cloud.google.com/translate/docs/languages). If
+   * [Language Support](https://cloud.google.com/translate/docs/languages). If
    * the source language isn't specified, the API attempts to identify the
    * source language automatically and returns the source language within the
    * response. Source language must be specified if the request contains a
@@ -115,8 +115,8 @@ public interface TranslateDocumentRequestOrBuilder
    *
    * 
    * Required. The ISO-639 language code to use for translation of the input
-   * document, set to one of the language codes listed in [Language Support]
-   * (https://cloud.google.com/translate/docs/languages).
+   * document, set to one of the language codes listed in [Language
+   * Support](https://cloud.google.com/translate/docs/languages).
    * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; @@ -130,8 +130,8 @@ public interface TranslateDocumentRequestOrBuilder * *
    * Required. The ISO-639 language code to use for translation of the input
-   * document, set to one of the language codes listed in [Language Support]
-   * (https://cloud.google.com/translate/docs/languages).
+   * document, set to one of the language codes listed in [Language
+   * Support](https://cloud.google.com/translate/docs/languages).
    * 
* * string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-translate/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto b/java-translate/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto index e33a347a3fe4..3c217bedefba 100644 --- a/java-translate/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto +++ b/java-translate/proto-google-cloud-translate-v3/src/main/proto/google/cloud/translate/v3/translation_service.proto @@ -1041,7 +1041,7 @@ message TranslateDocumentRequest { // Optional. The ISO-639 language code of the input document if known, for // example, "en-US" or "sr-Latn". Supported language codes are listed in - // [Language Support] (https://cloud.google.com/translate/docs/languages). If + // [Language Support](https://cloud.google.com/translate/docs/languages). If // the source language isn't specified, the API attempts to identify the // source language automatically and returns the source language within the // response. Source language must be specified if the request contains a @@ -1049,8 +1049,8 @@ message TranslateDocumentRequest { string source_language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The ISO-639 language code to use for translation of the input - // document, set to one of the language codes listed in [Language Support] - // (https://cloud.google.com/translate/docs/languages). + // document, set to one of the language codes listed in [Language + // Support](https://cloud.google.com/translate/docs/languages). string target_language_code = 3 [(google.api.field_behavior) = REQUIRED]; // Required. Input configurations. diff --git a/java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java b/java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java index 50f3a4d7093c..20c43c0a4e2f 100644 --- a/java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java +++ b/java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextGlossaryConfig.java @@ -23,7 +23,6 @@ * * *
- * -----------------------------------------------------------------------------
  * Configures which glossary should be used for a specific target language,
  * and defines options for applying that glossary.
  * 
@@ -315,7 +314,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * -----------------------------------------------------------------------------
    * Configures which glossary should be used for a specific target language,
    * and defines options for applying that glossary.
    * 
diff --git a/java-translate/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto b/java-translate/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto index dc0a0ce7de5b..b695863ae12d 100644 --- a/java-translate/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto +++ b/java-translate/proto-google-cloud-translate-v3beta1/src/main/proto/google/cloud/translate/v3beta1/translation_service.proto @@ -175,7 +175,6 @@ service TranslationService { } } -// ----------------------------------------------------------------------------- // Configures which glossary should be used for a specific target language, // and defines options for applying that glossary. message TranslateTextGlossaryConfig {