From 32a384dd97e448bd9d2656f9c7645095d6a70220 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:24:18 +0000 Subject: [PATCH] feat: release Control and ServingConfig serivces to v2 version (#522) - [ ] Regenerate this pull request now. feat: release AttributesConfig APIs to v2 version feat: release CompletionConfig APIs to v2 version feat: add local inventories info to the Product resource docs: Improved documentation for Fullfillment and Inventory API in ProductService docs: minor documentation format and typo fixes PiperOrigin-RevId: 469399525 Source-Link: https://github.com/googleapis/googleapis/commit/e9bcb6c5e65a3cd7ffd5f8d5908436e20cfcfbd9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/14169c645e64175b441d599cdb500c17f96441b2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTQxNjljNjQ1ZTY0MTc1YjQ0MWQ1OTljZGI1MDBjMTdmOTY0NDFiMiJ9 --- .../cloud/retail/v2/CatalogServiceClient.java | 607 + .../retail/v2/CatalogServiceSettings.java | 84 + .../cloud/retail/v2/ControlServiceClient.java | 866 ++ .../retail/v2/ControlServiceSettings.java | 249 + .../cloud/retail/v2/ProductServiceClient.java | 144 + .../retail/v2/ServingConfigServiceClient.java | 1172 ++ .../v2/ServingConfigServiceSettings.java | 278 + .../retail/v2/UserEventServiceClient.java | 12 +- .../cloud/retail/v2/gapic_metadata.json | 75 + .../google/cloud/retail/v2/package-info.java | 36 + .../retail/v2/stub/CatalogServiceStub.java | 41 + .../v2/stub/CatalogServiceStubSettings.java | 195 +- .../retail/v2/stub/ControlServiceStub.java | 68 + .../v2/stub/ControlServiceStubSettings.java | 475 + .../v2/stub/GrpcCatalogServiceStub.java | 251 + .../GrpcControlServiceCallableFactory.java | 113 + .../v2/stub/GrpcControlServiceStub.java | 292 + ...pcServingConfigServiceCallableFactory.java | 113 + .../v2/stub/GrpcServingConfigServiceStub.java | 376 + .../v2/stub/HttpJsonCatalogServiceStub.java | 403 + ...HttpJsonControlServiceCallableFactory.java | 105 + .../v2/stub/HttpJsonControlServiceStub.java | 410 + ...onServingConfigServiceCallableFactory.java | 105 + .../HttpJsonServingConfigServiceStub.java | 539 + .../v2/stub/ServingConfigServiceStub.java | 80 + .../ServingConfigServiceStubSettings.java | 546 + .../v2/CatalogServiceClientHttpJsonTest.java | 515 + .../retail/v2/CatalogServiceClientTest.java | 431 + .../v2/ControlServiceClientHttpJsonTest.java | 529 + .../retail/v2/ControlServiceClientTest.java | 464 + .../retail/v2/MockCatalogServiceImpl.java | 147 + .../cloud/retail/v2/MockControlService.java | 59 + .../retail/v2/MockControlServiceImpl.java | 164 + .../retail/v2/MockServingConfigService.java | 59 + .../v2/MockServingConfigServiceImpl.java | 209 + .../v2/ProductServiceClientHttpJsonTest.java | 9 + .../retail/v2/ProductServiceClientTest.java | 5 + ...ervingConfigServiceClientHttpJsonTest.java | 899 ++ .../v2/ServingConfigServiceClientTest.java | 777 ++ .../cloud/retail/v2/CatalogServiceGrpc.java | 924 ++ .../cloud/retail/v2/ControlServiceGrpc.java | 836 ++ .../cloud/retail/v2/ProductServiceGrpc.java | 100 + .../retail/v2/ServingConfigServiceGrpc.java | 1123 ++ .../cloud/retail/v2/UserEventServiceGrpc.java | 16 +- .../retail/v2/AddCatalogAttributeRequest.java | 978 ++ .../AddCatalogAttributeRequestOrBuilder.java | 100 + .../cloud/retail/v2/AddControlRequest.java | 843 ++ .../retail/v2/AddControlRequestOrBuilder.java | 83 + .../cloud/retail/v2/AttributeConfigLevel.java | 185 + .../cloud/retail/v2/AttributesConfig.java | 1281 ++ .../cloud/retail/v2/AttributesConfigName.java | 223 + .../retail/v2/AttributesConfigOrBuilder.java | 185 + .../cloud/retail/v2/BigQuerySource.java | 81 +- .../retail/v2/BigQuerySourceOrBuilder.java | 21 +- .../cloud/retail/v2/CatalogAttribute.java | 2270 +++ .../retail/v2/CatalogAttributeOrBuilder.java | 234 + .../google/cloud/retail/v2/CatalogProto.java | 147 +- .../cloud/retail/v2/CatalogServiceProto.java | 204 +- .../google/cloud/retail/v2/CommonProto.java | 297 +- .../cloud/retail/v2/CompleteQueryRequest.java | 12 +- .../v2/CompleteQueryRequestOrBuilder.java | 3 +- .../cloud/retail/v2/CompletionConfig.java | 2781 ++++ .../cloud/retail/v2/CompletionConfigName.java | 223 + .../retail/v2/CompletionConfigOrBuilder.java | 372 + .../com/google/cloud/retail/v2/Condition.java | 3415 +++++ .../cloud/retail/v2/ConditionOrBuilder.java | 149 + .../com/google/cloud/retail/v2/Control.java | 2629 ++++ .../google/cloud/retail/v2/ControlName.java | 257 + .../cloud/retail/v2/ControlOrBuilder.java | 398 + .../google/cloud/retail/v2/ControlProto.java | 98 + .../cloud/retail/v2/ControlServiceProto.java | 199 + .../cloud/retail/v2/CreateControlRequest.java | 1144 ++ .../v2/CreateControlRequestOrBuilder.java | 125 + .../retail/v2/CreateServingConfigRequest.java | 1162 ++ .../CreateServingConfigRequestOrBuilder.java | 128 + .../cloud/retail/v2/CustomAttribute.java | 72 +- .../retail/v2/CustomAttributeOrBuilder.java | 24 +- .../cloud/retail/v2/DeleteControlRequest.java | 658 + .../v2/DeleteControlRequestOrBuilder.java | 56 + .../retail/v2/DeleteServingConfigRequest.java | 660 + .../DeleteServingConfigRequestOrBuilder.java | 56 + .../com/google/cloud/retail/v2/GcsSource.java | 44 +- .../cloud/retail/v2/GcsSourceOrBuilder.java | 12 +- .../retail/v2/GetAttributesConfigRequest.java | 664 + .../GetAttributesConfigRequestOrBuilder.java | 56 + .../retail/v2/GetCompletionConfigRequest.java | 664 + .../GetCompletionConfigRequestOrBuilder.java | 56 + .../cloud/retail/v2/GetControlRequest.java | 657 + .../retail/v2/GetControlRequestOrBuilder.java | 56 + .../retail/v2/GetServingConfigRequest.java | 659 + .../v2/GetServingConfigRequestOrBuilder.java | 56 + .../v2/ImportCompletionDataRequest.java | 28 +- .../ImportCompletionDataRequestOrBuilder.java | 8 +- .../cloud/retail/v2/ImportErrorsConfig.java | 18 +- .../v2/ImportErrorsConfigOrBuilder.java | 6 +- .../cloud/retail/v2/ImportMetadata.java | 46 +- .../retail/v2/ImportMetadataOrBuilder.java | 12 +- .../retail/v2/ImportProductsRequest.java | 174 +- .../v2/ImportProductsRequestOrBuilder.java | 44 +- .../cloud/retail/v2/ListControlsRequest.java | 1144 ++ .../v2/ListControlsRequestOrBuilder.java | 130 + .../cloud/retail/v2/ListControlsResponse.java | 1128 ++ .../v2/ListControlsResponseOrBuilder.java | 101 + .../retail/v2/ListServingConfigsRequest.java | 943 ++ .../ListServingConfigsRequestOrBuilder.java | 98 + .../retail/v2/ListServingConfigsResponse.java | 1137 ++ .../ListServingConfigsResponseOrBuilder.java | 102 + .../com/google/cloud/retail/v2/Product.java | 614 +- .../cloud/retail/v2/ProductOrBuilder.java | 80 +- .../google/cloud/retail/v2/ProductProto.java | 44 +- .../v2/RemoveCatalogAttributeRequest.java | 850 ++ ...emoveCatalogAttributeRequestOrBuilder.java | 83 + .../cloud/retail/v2/RemoveControlRequest.java | 844 ++ .../v2/RemoveControlRequestOrBuilder.java | 83 + .../v2/ReplaceCatalogAttributeRequest.java | 1299 ++ ...placeCatalogAttributeRequestOrBuilder.java | 147 + .../java/com/google/cloud/retail/v2/Rule.java | 11564 ++++++++++++++++ .../google/cloud/retail/v2/RuleOrBuilder.java | 354 + .../google/cloud/retail/v2/SearchRequest.java | 158 +- .../retail/v2/SearchRequestOrBuilder.java | 40 +- .../cloud/retail/v2/SearchResponse.java | 480 + .../cloud/retail/v2/SearchServiceProto.java | 62 +- .../retail/v2/SearchSolutionUseCase.java | 185 + .../google/cloud/retail/v2/ServingConfig.java | 6410 +++++++++ .../cloud/retail/v2/ServingConfigName.java | 269 + .../retail/v2/ServingConfigOrBuilder.java | 1185 ++ .../cloud/retail/v2/ServingConfigProto.java | 123 + .../retail/v2/ServingConfigServiceProto.java | 246 + .../google/cloud/retail/v2/SolutionType.java | 176 + .../v2/UpdateAttributesConfigRequest.java | 1097 ++ ...pdateAttributesConfigRequestOrBuilder.java | 116 + .../v2/UpdateCompletionConfigRequest.java | 1193 ++ ...pdateCompletionConfigRequestOrBuilder.java | 140 + .../cloud/retail/v2/UpdateControlRequest.java | 1063 ++ .../v2/UpdateControlRequestOrBuilder.java | 110 + .../retail/v2/UpdateServingConfigRequest.java | 1081 ++ .../UpdateServingConfigRequestOrBuilder.java | 113 + .../google/cloud/retail/v2/catalog.proto | 240 + .../cloud/retail/v2/catalog_service.proto | 230 + .../proto/google/cloud/retail/v2/common.proto | 285 +- .../cloud/retail/v2/completion_service.proto | 3 +- .../google/cloud/retail/v2/control.proto | 93 + .../cloud/retail/v2/control_service.proto | 185 + .../cloud/retail/v2/import_config.proto | 55 +- .../google/cloud/retail/v2/product.proto | 9 +- .../cloud/retail/v2/product_service.proto | 35 + .../cloud/retail/v2/search_service.proto | 31 +- .../cloud/retail/v2/serving_config.proto | 248 + .../retail/v2/serving_config_service.proto | 240 + .../cloud/retail/v2/user_event_service.proto | 4 +- .../AsyncAddCatalogAttribute.java | 50 + .../SyncAddCatalogAttribute.java | 46 + .../AsyncGetAttributesConfig.java | 47 + .../SyncGetAttributesConfig.java | 43 + ...tAttributesConfigAttributesconfigname.java | 39 + .../SyncGetAttributesConfigString.java | 39 + .../AsyncGetCompletionConfig.java | 47 + .../SyncGetCompletionConfig.java | 43 + ...tCompletionConfigCompletionconfigname.java | 39 + .../SyncGetCompletionConfigString.java | 39 + .../AsyncRemoveCatalogAttribute.java | 49 + .../SyncRemoveCatalogAttribute.java | 45 + .../AsyncReplaceCatalogAttribute.java | 52 + .../SyncReplaceCatalogAttribute.java | 48 + .../AsyncUpdateAttributesConfig.java | 48 + .../SyncUpdateAttributesConfig.java | 44 + ...ibutesConfigAttributesconfigFieldmask.java | 41 + .../AsyncUpdateCompletionConfig.java | 48 + .../SyncUpdateCompletionConfig.java | 44 + ...letionConfigCompletionconfigFieldmask.java | 41 + .../SyncCreateSetCredentialsProvider.java | 41 + .../SyncCreateSetCredentialsProvider1.java | 40 + .../create/SyncCreateSetEndpoint.java | 38 + .../createcontrol/AsyncCreateControl.java | 48 + .../createcontrol/SyncCreateControl.java | 45 + ...CreateControlCatalognameControlString.java | 41 + .../SyncCreateControlStringControlString.java | 41 + .../deletecontrol/AsyncDeleteControl.java | 47 + .../deletecontrol/SyncDeleteControl.java | 44 + .../SyncDeleteControlControlname.java | 39 + .../SyncDeleteControlString.java | 39 + .../getcontrol/AsyncGetControl.java | 47 + .../getcontrol/SyncGetControl.java | 44 + .../getcontrol/SyncGetControlControlname.java | 39 + .../getcontrol/SyncGetControlString.java | 39 + .../listcontrols/AsyncListControls.java | 52 + .../listcontrols/AsyncListControlsPaged.java | 59 + .../listcontrols/SyncListControls.java | 48 + .../SyncListControlsCatalogname.java | 41 + .../listcontrols/SyncListControlsString.java | 41 + .../updatecontrol/AsyncUpdateControl.java | 47 + .../updatecontrol/SyncUpdateControl.java | 44 + .../SyncUpdateControlControlFieldmask.java | 40 + .../createcontrol/SyncCreateControl.java | 46 + .../addcontrol/AsyncAddControl.java | 51 + .../addcontrol/SyncAddControl.java | 47 + .../SyncAddControlServingconfigname.java | 41 + .../addcontrol/SyncAddControlString.java | 42 + .../SyncCreateSetCredentialsProvider.java | 42 + .../SyncCreateSetCredentialsProvider1.java | 41 + .../create/SyncCreateSetEndpoint.java | 39 + .../AsyncCreateServingConfig.java | 50 + .../SyncCreateServingConfig.java | 46 + ...gConfigCatalognameServingconfigString.java | 43 + ...ervingConfigStringServingconfigString.java | 43 + .../AsyncDeleteServingConfig.java | 50 + .../SyncDeleteServingConfig.java | 46 + ...cDeleteServingConfigServingconfigname.java | 41 + .../SyncDeleteServingConfigString.java | 42 + .../AsyncGetServingConfig.java | 50 + .../SyncGetServingConfig.java | 46 + ...SyncGetServingConfigServingconfigname.java | 41 + .../SyncGetServingConfigString.java | 42 + .../AsyncListServingConfigs.java | 52 + .../AsyncListServingConfigsPaged.java | 60 + .../SyncListServingConfigs.java | 49 + .../SyncListServingConfigsCatalogname.java | 43 + .../SyncListServingConfigsString.java | 43 + .../removecontrol/AsyncRemoveControl.java | 51 + .../removecontrol/SyncRemoveControl.java | 47 + .../SyncRemoveControlServingconfigname.java | 41 + .../SyncRemoveControlString.java | 42 + .../AsyncUpdateServingConfig.java | 49 + .../SyncUpdateServingConfig.java | 45 + ...teServingConfigServingconfigFieldmask.java | 42 + .../SyncCreateServingConfig.java | 47 + .../createcontrol/SyncCreateControl.java | 46 + .../SyncCreateServingConfig.java | 47 + 228 files changed, 79481 insertions(+), 572 deletions(-) create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceSettings.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceSettings.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcControlServiceCallableFactory.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcControlServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcServingConfigServiceCallableFactory.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/GrpcServingConfigServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceCallableFactory.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceCallableFactory.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStub.java create mode 100644 java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ControlServiceClientHttpJsonTest.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ControlServiceClientTest.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockControlService.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockControlServiceImpl.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockServingConfigService.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/MockServingConfigServiceImpl.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientHttpJsonTest.java create mode 100644 java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/ServingConfigServiceClientTest.java create mode 100644 java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ControlServiceGrpc.java create mode 100644 java-retail/grpc-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceGrpc.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributeConfigLevel.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfig.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfigName.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfigOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttributeOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigName.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfigOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ConditionOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Control.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ControlName.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ControlOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ControlProto.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ControlServiceProto.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponse.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponseOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponse.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponseOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RuleOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchSolutionUseCase.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigName.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigProto.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceProto.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SolutionType.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequest.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequestOrBuilder.java create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/control.proto create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/control_service.proto create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config.proto create mode 100644 java-retail/proto-google-cloud-retail-v2/src/main/proto/google/cloud/retail/v2/serving_config_service.proto create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/AsyncCreateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/AsyncDeleteControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/AsyncGetControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlControlname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControls.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControlsPaged.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControls.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsCatalogname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/AsyncUpdateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/controlservicesettings/createcontrol/SyncCreateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/AsyncAddControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetEndpoint.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java create mode 100644 java-retail/samples/snippets/generated/com/google/cloud/retail/v2/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java index 862bd411d6d..320310e5582 100644 --- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java +++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java @@ -738,6 +738,613 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r return stub.getDefaultBranchCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + * CompletionConfig response = catalogServiceClient.getCompletionConfig(name); + * } + * }+ * + * @param name Required. Full CompletionConfig resource name. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CompletionConfig getCompletionConfig(CompletionConfigName name) { + GetCompletionConfigRequest request = + GetCompletionConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getCompletionConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + * CompletionConfig response = catalogServiceClient.getCompletionConfig(name); + * } + * }+ * + * @param name Required. Full CompletionConfig resource name. Format: + * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CompletionConfig getCompletionConfig(String name) { + GetCompletionConfigRequest request = + GetCompletionConfigRequest.newBuilder().setName(name).build(); + return getCompletionConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * GetCompletionConfigRequest request = + * GetCompletionConfigRequest.newBuilder() + * .setName(CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .build(); + * CompletionConfig response = catalogServiceClient.getCompletionConfig(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 CompletionConfig getCompletionConfig(GetCompletionConfigRequest request) { + return getCompletionConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * GetCompletionConfigRequest request = + * GetCompletionConfigRequest.newBuilder() + * .setName(CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.getCompletionConfigCallable().futureCall(request); + * // Do something. + * CompletionConfig response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * CompletionConfig completionConfig = CompletionConfig.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * CompletionConfig response = + * catalogServiceClient.updateCompletionConfig(completionConfig, updateMask); + * } + * }+ * + * @param completionConfig Required. The + * [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. + *
If the caller does not have permission to update the + * [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a PERMISSION_DENIED error + * is returned. + *
If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update does not + * exist, a NOT_FOUND error is returned. + * @param updateMask Indicates which fields in the provided + * [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The following are + * the only supported fields: + *
If not set, all supported fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CompletionConfig updateCompletionConfig( + CompletionConfig completionConfig, FieldMask updateMask) { + UpdateCompletionConfigRequest request = + UpdateCompletionConfigRequest.newBuilder() + .setCompletionConfig(completionConfig) + .setUpdateMask(updateMask) + .build(); + return updateCompletionConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * UpdateCompletionConfigRequest request = + * UpdateCompletionConfigRequest.newBuilder() + * .setCompletionConfig(CompletionConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * CompletionConfig response = catalogServiceClient.updateCompletionConfig(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 CompletionConfig updateCompletionConfig(UpdateCompletionConfigRequest request) { + return updateCompletionConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * UpdateCompletionConfigRequest request = + * UpdateCompletionConfigRequest.newBuilder() + * .setCompletionConfig(CompletionConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.updateCompletionConfigCallable().futureCall(request); + * // Do something. + * CompletionConfig response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + * AttributesConfig response = catalogServiceClient.getAttributesConfig(name); + * } + * }+ * + * @param name Required. Full AttributesConfig resource name. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AttributesConfig getAttributesConfig(AttributesConfigName name) { + GetAttributesConfigRequest request = + GetAttributesConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAttributesConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + * AttributesConfig response = catalogServiceClient.getAttributesConfig(name); + * } + * }+ * + * @param name Required. Full AttributesConfig resource name. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AttributesConfig getAttributesConfig(String name) { + GetAttributesConfigRequest request = + GetAttributesConfigRequest.newBuilder().setName(name).build(); + return getAttributesConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * GetAttributesConfigRequest request = + * GetAttributesConfigRequest.newBuilder() + * .setName(AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .build(); + * AttributesConfig response = catalogServiceClient.getAttributesConfig(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 AttributesConfig getAttributesConfig(GetAttributesConfigRequest request) { + return getAttributesConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * GetAttributesConfigRequest request = + * GetAttributesConfigRequest.newBuilder() + * .setName(AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.getAttributesConfigCallable().futureCall(request); + * // Do something. + * AttributesConfig response = future.get(); + * } + * }
The catalog attributes in the request will be updated in the catalog, or inserted if they do + * not exist. Existing catalog attributes not included in the request will remain unchanged. + * Attributes that are assigned to products, but do not exist at the catalog level, are always + * included in the response. The product attribute is assigned default values for missing catalog + * attribute fields, e.g., searchable and dynamic facetable options. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * AttributesConfig attributesConfig = AttributesConfig.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * AttributesConfig response = + * catalogServiceClient.updateAttributesConfig(attributesConfig, updateMask); + * } + * }+ * + * @param attributesConfig Required. The + * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. + * @param updateMask Indicates which fields in the provided + * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The following is the + * only supported field: + *
If not set, all supported fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AttributesConfig updateAttributesConfig( + AttributesConfig attributesConfig, FieldMask updateMask) { + UpdateAttributesConfigRequest request = + UpdateAttributesConfigRequest.newBuilder() + .setAttributesConfig(attributesConfig) + .setUpdateMask(updateMask) + .build(); + return updateAttributesConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
The catalog attributes in the request will be updated in the catalog, or inserted if they do + * not exist. Existing catalog attributes not included in the request will remain unchanged. + * Attributes that are assigned to products, but do not exist at the catalog level, are always + * included in the response. The product attribute is assigned default values for missing catalog + * attribute fields, e.g., searchable and dynamic facetable options. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * UpdateAttributesConfigRequest request = + * UpdateAttributesConfigRequest.newBuilder() + * .setAttributesConfig(AttributesConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * AttributesConfig response = catalogServiceClient.updateAttributesConfig(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 AttributesConfig updateAttributesConfig(UpdateAttributesConfigRequest request) { + return updateAttributesConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
The catalog attributes in the request will be updated in the catalog, or inserted if they do + * not exist. Existing catalog attributes not included in the request will remain unchanged. + * Attributes that are assigned to products, but do not exist at the catalog level, are always + * included in the response. The product attribute is assigned default values for missing catalog + * attribute fields, e.g., searchable and dynamic facetable options. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * UpdateAttributesConfigRequest request = + * UpdateAttributesConfigRequest.newBuilder() + * .setAttributesConfig(AttributesConfig.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.updateAttributesConfigCallable().futureCall(request); + * // Do something. + * AttributesConfig response = future.get(); + * } + * }
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an + * ALREADY_EXISTS error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * AddCatalogAttributeRequest request = + * AddCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setCatalogAttribute(CatalogAttribute.newBuilder().build()) + * .build(); + * AttributesConfig response = catalogServiceClient.addCatalogAttribute(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 AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest request) { + return addCatalogAttributeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the + * [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an + * ALREADY_EXISTS error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * AddCatalogAttributeRequest request = + * AddCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setCatalogAttribute(CatalogAttribute.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.addCatalogAttributeCallable().futureCall(request); + * // Do something. + * AttributesConfig response = future.get(); + * } + * }
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, + * a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * RemoveCatalogAttributeRequest request = + * RemoveCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setKey("key106079") + * .build(); + * AttributesConfig response = catalogServiceClient.removeCatalogAttribute(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 AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeRequest request) { + return removeCatalogAttributeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the + * [AttributesConfig][google.cloud.retail.v2.AttributesConfig]. + * + *
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, + * a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * RemoveCatalogAttributeRequest request = + * RemoveCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setKey("key106079") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.removeCatalogAttributeCallable().futureCall(request); + * // Do something. + * AttributesConfig response = future.get(); + * } + * }
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not + * exist, a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * ReplaceCatalogAttributeRequest request = + * ReplaceCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setCatalogAttribute(CatalogAttribute.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * AttributesConfig response = catalogServiceClient.replaceCatalogAttribute(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 AttributesConfig replaceCatalogAttribute(ReplaceCatalogAttributeRequest request) { + return replaceCatalogAttributeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the + * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute + * with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key]. + * + *
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not + * exist, a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) { + * ReplaceCatalogAttributeRequest request = + * ReplaceCatalogAttributeRequest.newBuilder() + * .setAttributesConfig( + * AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setCatalogAttribute(CatalogAttribute.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * catalogServiceClient.replaceCatalogAttributeCallable().futureCall(request); + * // Do something. + * AttributesConfig response = future.get(); + * } + * }
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + * Control control = Control.newBuilder().build(); + * String controlId = "controlId-395080872"; + * Control response = controlServiceClient.createControl(parent, control, controlId); + * } + * }+ * + *
Note: close() needs to be called on the ControlServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
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 ControlServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * ControlServiceSettings controlServiceSettings = + * ControlServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * ControlServiceSettings controlServiceSettings = + * ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * ControlServiceSettings controlServiceSettings = + * ControlServiceSettings.newBuilder() + * .setTransportChannelProvider( + * ControlServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + * .build(); + * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ControlServiceClient implements BackgroundResource { + private final ControlServiceSettings settings; + private final ControlServiceStub stub; + + /** Constructs an instance of ControlServiceClient with default settings. */ + public static final ControlServiceClient create() throws IOException { + return create(ControlServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ControlServiceClient, 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 ControlServiceClient create(ControlServiceSettings settings) + throws IOException { + return new ControlServiceClient(settings); + } + + /** + * Constructs an instance of ControlServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ControlServiceSettings). + */ + public static final ControlServiceClient create(ControlServiceStub stub) { + return new ControlServiceClient(stub); + } + + /** + * Constructs an instance of ControlServiceClient, 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 ControlServiceClient(ControlServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ControlServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected ControlServiceClient(ControlServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ControlServiceSettings getSettings() { + return settings; + } + + public ControlServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS + * error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + * Control control = Control.newBuilder().build(); + * String controlId = "controlId-395080872"; + * Control response = controlServiceClient.createControl(parent, control, controlId); + * } + * }+ * + * @param parent Required. Full resource name of parent catalog. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @param control Required. The Control to create. + * @param controlId Required. The ID to use for the Control, which will become the final component + * of the Control's resource name. + *
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Control createControl(CatalogName parent, Control control, String controlId) { + CreateControlRequest request = + CreateControlRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setControl(control) + .setControlId(controlId) + .build(); + return createControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS + * error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + * Control control = Control.newBuilder().build(); + * String controlId = "controlId-395080872"; + * Control response = controlServiceClient.createControl(parent, control, controlId); + * } + * }+ * + * @param parent Required. Full resource name of parent catalog. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @param control Required. The Control to create. + * @param controlId Required. The ID to use for the Control, which will become the final component + * of the Control's resource name. + *
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Control createControl(String parent, Control control, String controlId) { + CreateControlRequest request = + CreateControlRequest.newBuilder() + .setParent(parent) + .setControl(control) + .setControlId(controlId) + .build(); + return createControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS + * error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * CreateControlRequest request = + * CreateControlRequest.newBuilder() + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setControl(Control.newBuilder().build()) + * .setControlId("controlId-395080872") + * .build(); + * Control response = controlServiceClient.createControl(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 Control createControl(CreateControlRequest request) { + return createControlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS + * error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * CreateControlRequest request = + * CreateControlRequest.newBuilder() + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setControl(Control.newBuilder().build()) + * .setControlId("controlId-395080872") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = controlServiceClient.createControlCallable().futureCall(request); + * // Do something. + * Control response = future.get(); + * } + * }
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error + * is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]"); + * controlServiceClient.deleteControl(name); + * } + * }+ * + * @param name Required. The resource name of the Control to delete. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteControl(ControlName name) { + DeleteControlRequest request = + DeleteControlRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error + * is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString(); + * controlServiceClient.deleteControl(name); + * } + * }+ * + * @param name Required. The resource name of the Control to delete. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteControl(String name) { + DeleteControlRequest request = DeleteControlRequest.newBuilder().setName(name).build(); + deleteControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error + * is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * DeleteControlRequest request = + * DeleteControlRequest.newBuilder() + * .setName( + * ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString()) + * .build(); + * controlServiceClient.deleteControl(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteControl(DeleteControlRequest request) { + deleteControlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Control. + * + *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error + * is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * DeleteControlRequest request = + * DeleteControlRequest.newBuilder() + * .setName( + * ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = controlServiceClient.deleteControlCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an + * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does + * not exist, a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * Control control = Control.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Control response = controlServiceClient.updateControl(control, updateMask); + * } + * }+ * + * @param control Required. The Control to update. + * @param updateMask Indicates which fields in the provided + * [Control][google.cloud.retail.v2.Control] to update. The following are NOT supported: + *
If not set or empty, all supported fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Control updateControl(Control control, FieldMask updateMask) { + UpdateControlRequest request = + UpdateControlRequest.newBuilder().setControl(control).setUpdateMask(updateMask).build(); + return updateControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Control. + * + *
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an + * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does + * not exist, a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * UpdateControlRequest request = + * UpdateControlRequest.newBuilder() + * .setControl(Control.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Control response = controlServiceClient.updateControl(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 Control updateControl(UpdateControlRequest request) { + return updateControlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a Control. + * + *
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an + * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does + * not exist, a NOT_FOUND error is returned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * UpdateControlRequest request = + * UpdateControlRequest.newBuilder() + * .setControl(Control.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = controlServiceClient.updateControlCallable().futureCall(request); + * // Do something. + * Control response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]"); + * Control response = controlServiceClient.getControl(name); + * } + * }+ * + * @param name Required. The resource name of the Control to get. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Control getControl(ControlName name) { + GetControlRequest request = + GetControlRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Control. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString(); + * Control response = controlServiceClient.getControl(name); + * } + * }+ * + * @param name Required. The resource name of the Control to get. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Control getControl(String name) { + GetControlRequest request = GetControlRequest.newBuilder().setName(name).build(); + return getControl(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Control. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * GetControlRequest request = + * GetControlRequest.newBuilder() + * .setName( + * ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString()) + * .build(); + * Control response = controlServiceClient.getControl(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 Control getControl(GetControlRequest request) { + return getControlCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Control. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * GetControlRequest request = + * GetControlRequest.newBuilder() + * .setName( + * ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = controlServiceClient.getControlCallable().futureCall(request); + * // Do something. + * Control response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]"); + * for (Control element : controlServiceClient.listControls(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The catalog resource name. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListControlsPagedResponse listControls(CatalogName parent) { + ListControlsRequest request = + ListControlsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listControls(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString(); + * for (Control element : controlServiceClient.listControls(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The catalog resource name. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListControlsPagedResponse listControls(String parent) { + ListControlsRequest request = ListControlsRequest.newBuilder().setParent(parent).build(); + return listControls(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * ListControlsRequest request = + * ListControlsRequest.newBuilder() + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Control element : controlServiceClient.listControls(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 ListControlsPagedResponse listControls(ListControlsRequest request) { + return listControlsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog]. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * ListControlsRequest request = + * ListControlsRequest.newBuilder() + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * controlServiceClient.listControlsPagedCallable().futureCall(request); + * // Do something. + * for (Control element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) { + * ListControlsRequest request = + * ListControlsRequest.newBuilder() + * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListControlsResponse response = controlServiceClient.listControlsCallable().call(request); + * for (Control element : response.getControlsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of createControl to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated for illustrative purposes only. + * // It may require modifications to work in your environment. + * ControlServiceSettings.Builder controlServiceSettingsBuilder = + * ControlServiceSettings.newBuilder(); + * controlServiceSettingsBuilder + * .createControlSettings() + * .setRetrySettings( + * controlServiceSettingsBuilder + * .createControlSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ControlServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1106,6 +1112,12 @@ public final OperationFuture The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1170,6 +1182,12 @@ public final OperationFuture The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1234,6 +1252,12 @@ public final OperationFuture The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1273,6 +1297,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1319,6 +1349,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1364,6 +1400,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1409,6 +1451,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1454,6 +1502,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1498,6 +1552,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1544,6 +1604,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1589,6 +1655,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1634,6 +1706,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1681,6 +1759,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1730,6 +1814,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1781,6 +1871,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1831,6 +1927,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1881,6 +1983,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1931,6 +2039,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -1977,6 +2091,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -2026,6 +2146,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -2074,6 +2200,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -2121,6 +2253,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
@@ -2170,6 +2308,12 @@ public final UnaryCallable The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will
+ * return NOT_FOUND afterwards.
+ *
+ * If conflicting updates are issued, the [Operation][]s associated with the stale updates will
+ * not be marked as [done][Operation.done] until being obsolete.
+ *
* This feature is only available for users who have Retail Search enabled. Please enable
* Retail Search on Cloud Console before using this feature.
*
diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java
new file mode 100644
index 00000000000..69e3c868686
--- /dev/null
+++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java
@@ -0,0 +1,1172 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.retail.v2.stub.ServingConfigServiceStub;
+import com.google.cloud.retail.v2.stub.ServingConfigServiceStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Service for modifying ServingConfig.
+ *
+ * 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:
+ *
+ * Note: close() needs to be called on the ServingConfigServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * 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 ServingConfigServiceSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ServingConfigServiceClient implements BackgroundResource {
+ private final ServingConfigServiceSettings settings;
+ private final ServingConfigServiceStub stub;
+
+ /** Constructs an instance of ServingConfigServiceClient with default settings. */
+ public static final ServingConfigServiceClient create() throws IOException {
+ return create(ServingConfigServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ServingConfigServiceClient, 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 ServingConfigServiceClient create(ServingConfigServiceSettings settings)
+ throws IOException {
+ return new ServingConfigServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ServingConfigServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(ServingConfigServiceSettings).
+ */
+ public static final ServingConfigServiceClient create(ServingConfigServiceStub stub) {
+ return new ServingConfigServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ServingConfigServiceClient, 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 ServingConfigServiceClient(ServingConfigServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ServingConfigServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ServingConfigServiceClient(ServingConfigServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ServingConfigServiceSettings getSettings() {
+ return settings;
+ }
+
+ public ServingConfigServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ServingConfig.
+ *
+ * A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a
+ * [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.
+ *
+ * Sample code:
+ *
+ * This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig createServingConfig(
+ CatalogName parent, ServingConfig servingConfig, String servingConfigId) {
+ CreateServingConfigRequest request =
+ CreateServingConfigRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setServingConfig(servingConfig)
+ .setServingConfigId(servingConfigId)
+ .build();
+ return createServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ServingConfig.
+ *
+ * A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a
+ * [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.
+ *
+ * Sample code:
+ *
+ * This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig createServingConfig(
+ String parent, ServingConfig servingConfig, String servingConfigId) {
+ CreateServingConfigRequest request =
+ CreateServingConfigRequest.newBuilder()
+ .setParent(parent)
+ .setServingConfig(servingConfig)
+ .setServingConfigId(servingConfigId)
+ .build();
+ return createServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ServingConfig.
+ *
+ * A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a
+ * [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.
+ *
+ * Sample code:
+ *
+ * A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a
+ * [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * If not set, all supported fields are updated.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig updateServingConfig(
+ ServingConfig servingConfig, FieldMask updateMask) {
+ UpdateServingConfigRequest request =
+ UpdateServingConfigRequest.newBuilder()
+ .setServingConfig(servingConfig)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ServingConfig.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Returns a NotFound error if the ServingConfig does not exist.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createServingConfig to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Operation.response is of type ImportResponse. Note that it is possible for a subset of the
- * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ * `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of
+ * the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.
*
* Sample code:
*
@@ -436,8 +436,8 @@ public final OperationFuture Operation.response is of type ImportResponse. Note that it is possible for a subset of the
- * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ * `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of
+ * the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.
*
* Sample code:
*
@@ -468,8 +468,8 @@ public final OperationFuture Operation.response is of type ImportResponse. Note that it is possible for a subset of the
- * items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+ * `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of
+ * the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.
*
* Sample code:
*
diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json
index b27e46ab9db..fb810b2c0f0 100644
--- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json
+++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/gapic_metadata.json
@@ -10,17 +10,38 @@
"grpc": {
"libraryClient": "CatalogServiceClient",
"rpcs": {
+ "AddCatalogAttribute": {
+ "methods": ["addCatalogAttribute", "addCatalogAttributeCallable"]
+ },
+ "GetAttributesConfig": {
+ "methods": ["getAttributesConfig", "getAttributesConfig", "getAttributesConfig", "getAttributesConfigCallable"]
+ },
+ "GetCompletionConfig": {
+ "methods": ["getCompletionConfig", "getCompletionConfig", "getCompletionConfig", "getCompletionConfigCallable"]
+ },
"GetDefaultBranch": {
"methods": ["getDefaultBranch", "getDefaultBranch", "getDefaultBranch", "getDefaultBranchCallable"]
},
"ListCatalogs": {
"methods": ["listCatalogs", "listCatalogs", "listCatalogs", "listCatalogsPagedCallable", "listCatalogsCallable"]
},
+ "RemoveCatalogAttribute": {
+ "methods": ["removeCatalogAttribute", "removeCatalogAttributeCallable"]
+ },
+ "ReplaceCatalogAttribute": {
+ "methods": ["replaceCatalogAttribute", "replaceCatalogAttributeCallable"]
+ },
"SetDefaultBranch": {
"methods": ["setDefaultBranch", "setDefaultBranch", "setDefaultBranch", "setDefaultBranchCallable"]
},
+ "UpdateAttributesConfig": {
+ "methods": ["updateAttributesConfig", "updateAttributesConfig", "updateAttributesConfigCallable"]
+ },
"UpdateCatalog": {
"methods": ["updateCatalog", "updateCatalog", "updateCatalogCallable"]
+ },
+ "UpdateCompletionConfig": {
+ "methods": ["updateCompletionConfig", "updateCompletionConfig", "updateCompletionConfigCallable"]
}
}
}
@@ -41,6 +62,30 @@
}
}
},
+ "ControlService": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "ControlServiceClient",
+ "rpcs": {
+ "CreateControl": {
+ "methods": ["createControl", "createControl", "createControl", "createControlCallable"]
+ },
+ "DeleteControl": {
+ "methods": ["deleteControl", "deleteControl", "deleteControl", "deleteControlCallable"]
+ },
+ "GetControl": {
+ "methods": ["getControl", "getControl", "getControl", "getControlCallable"]
+ },
+ "ListControls": {
+ "methods": ["listControls", "listControls", "listControls", "listControlsPagedCallable", "listControlsCallable"]
+ },
+ "UpdateControl": {
+ "methods": ["updateControl", "updateControl", "updateControlCallable"]
+ }
+ }
+ }
+ }
+ },
"PredictionService": {
"clients": {
"grpc": {
@@ -107,6 +152,36 @@
}
}
},
+ "ServingConfigService": {
+ "clients": {
+ "grpc": {
+ "libraryClient": "ServingConfigServiceClient",
+ "rpcs": {
+ "AddControl": {
+ "methods": ["addControl", "addControl", "addControl", "addControlCallable"]
+ },
+ "CreateServingConfig": {
+ "methods": ["createServingConfig", "createServingConfig", "createServingConfig", "createServingConfigCallable"]
+ },
+ "DeleteServingConfig": {
+ "methods": ["deleteServingConfig", "deleteServingConfig", "deleteServingConfig", "deleteServingConfigCallable"]
+ },
+ "GetServingConfig": {
+ "methods": ["getServingConfig", "getServingConfig", "getServingConfig", "getServingConfigCallable"]
+ },
+ "ListServingConfigs": {
+ "methods": ["listServingConfigs", "listServingConfigs", "listServingConfigs", "listServingConfigsPagedCallable", "listServingConfigsCallable"]
+ },
+ "RemoveControl": {
+ "methods": ["removeControl", "removeControl", "removeControl", "removeControlCallable"]
+ },
+ "UpdateServingConfig": {
+ "methods": ["updateServingConfig", "updateServingConfig", "updateServingConfigCallable"]
+ }
+ }
+ }
+ }
+ },
"UserEventService": {
"clients": {
"grpc": {
diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
index d2822d28d78..d6892b47a2b 100644
--- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
+++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
@@ -62,6 +62,23 @@
* }
* }
*
+ * ======================= ControlServiceClient =======================
+ *
+ * Service Description: Service for modifying Control.
+ *
+ * Sample for ControlServiceClient:
+ *
+ * ======================= PredictionServiceClient =======================
*
* Service Description: Service for making recommendation prediction.
@@ -148,6 +165,25 @@
* }
* }
*
+ * ======================= ServingConfigServiceClient =======================
+ *
+ * Service Description: Service for modifying ServingConfig.
+ *
+ * Sample for ServingConfigServiceClient:
+ *
+ * ======================= UserEventServiceClient =======================
*
* Service Description: Service for ingesting end user actions on the customer website.
diff --git a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStub.java b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStub.java
index d9b20854a45..d3f66147e0c 100644
--- a/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStub.java
+++ b/java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStub.java
@@ -20,13 +20,22 @@
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.retail.v2.AddCatalogAttributeRequest;
+import com.google.cloud.retail.v2.AttributesConfig;
import com.google.cloud.retail.v2.Catalog;
+import com.google.cloud.retail.v2.CompletionConfig;
+import com.google.cloud.retail.v2.GetAttributesConfigRequest;
+import com.google.cloud.retail.v2.GetCompletionConfigRequest;
import com.google.cloud.retail.v2.GetDefaultBranchRequest;
import com.google.cloud.retail.v2.GetDefaultBranchResponse;
import com.google.cloud.retail.v2.ListCatalogsRequest;
import com.google.cloud.retail.v2.ListCatalogsResponse;
+import com.google.cloud.retail.v2.RemoveCatalogAttributeRequest;
+import com.google.cloud.retail.v2.ReplaceCatalogAttributeRequest;
import com.google.cloud.retail.v2.SetDefaultBranchRequest;
+import com.google.cloud.retail.v2.UpdateAttributesConfigRequest;
import com.google.cloud.retail.v2.UpdateCatalogRequest;
+import com.google.cloud.retail.v2.UpdateCompletionConfigRequest;
import com.google.protobuf.Empty;
import javax.annotation.Generated;
@@ -60,6 +69,38 @@ public UnaryCallable This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ControlServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createControl to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ * ServingConfig servingConfig = ServingConfig.newBuilder().build();
+ * String servingConfigId = "servingConfigId-831052759";
+ * ServingConfig response =
+ * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ServingConfigServiceSettings servingConfigServiceSettings =
+ * ServingConfigServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create(servingConfigServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ServingConfigServiceSettings servingConfigServiceSettings =
+ * ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create(servingConfigServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ServingConfigServiceSettings servingConfigServiceSettings =
+ * ServingConfigServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * ServingConfigServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create(servingConfigServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ * ServingConfig servingConfig = ServingConfig.newBuilder().build();
+ * String servingConfigId = "servingConfigId-831052759";
+ * ServingConfig response =
+ * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
+ * }
+ * }
+ *
+ * @param parent Required. Full resource name of parent. Format:
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+ * @param servingConfig Required. The ServingConfig to create.
+ * @param servingConfigId Required. The ID to use for the ServingConfig, which will become the
+ * final component of the ServingConfig's resource name.
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+ * ServingConfig servingConfig = ServingConfig.newBuilder().build();
+ * String servingConfigId = "servingConfigId-831052759";
+ * ServingConfig response =
+ * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
+ * }
+ * }
+ *
+ * @param parent Required. Full resource name of parent. Format:
+ * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+ * @param servingConfig Required. The ServingConfig to create.
+ * @param servingConfigId Required. The ID to use for the ServingConfig, which will become the
+ * final component of the ServingConfig's resource name.
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CreateServingConfigRequest request =
+ * CreateServingConfigRequest.newBuilder()
+ * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+ * .setServingConfig(ServingConfig.newBuilder().build())
+ * .setServingConfigId("servingConfigId-831052759")
+ * .build();
+ * ServingConfig response = servingConfigServiceClient.createServingConfig(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 ServingConfig createServingConfig(CreateServingConfigRequest request) {
+ return createServingConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CreateServingConfigRequest request =
+ * CreateServingConfigRequest.newBuilder()
+ * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+ * .setServingConfig(ServingConfig.newBuilder().build())
+ * .setServingConfigId("servingConfigId-831052759")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ServingConfigName name =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]");
+ * servingConfigServiceClient.deleteServingConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ServingConfig to delete. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServingConfig(ServingConfigName name) {
+ DeleteServingConfigRequest request =
+ DeleteServingConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String name =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString();
+ * servingConfigServiceClient.deleteServingConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ServingConfig to delete. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServingConfig(String name) {
+ DeleteServingConfigRequest request =
+ DeleteServingConfigRequest.newBuilder().setName(name).build();
+ deleteServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * DeleteServingConfigRequest request =
+ * DeleteServingConfigRequest.newBuilder()
+ * .setName(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .build();
+ * servingConfigServiceClient.deleteServingConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteServingConfig(DeleteServingConfigRequest request) {
+ deleteServingConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * DeleteServingConfigRequest request =
+ * DeleteServingConfigRequest.newBuilder()
+ * .setName(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ServingConfig servingConfig = ServingConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * ServingConfig response =
+ * servingConfigServiceClient.updateServingConfig(servingConfig, updateMask);
+ * }
+ * }
+ *
+ * @param servingConfig Required. The ServingConfig to update.
+ * @param updateMask Indicates which fields in the provided
+ * [ServingConfig][google.cloud.retail.v2.ServingConfig] to update. The following are NOT
+ * supported:
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * UpdateServingConfigRequest request =
+ * UpdateServingConfigRequest.newBuilder()
+ * .setServingConfig(ServingConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ServingConfig response = servingConfigServiceClient.updateServingConfig(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 ServingConfig updateServingConfig(UpdateServingConfigRequest request) {
+ return updateServingConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * UpdateServingConfigRequest request =
+ * UpdateServingConfigRequest.newBuilder()
+ * .setServingConfig(ServingConfig.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ServingConfigName name =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]");
+ * ServingConfig response = servingConfigServiceClient.getServingConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ServingConfig to get. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig getServingConfig(ServingConfigName name) {
+ GetServingConfigRequest request =
+ GetServingConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String name =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString();
+ * ServingConfig response = servingConfigServiceClient.getServingConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ServingConfig to get. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig getServingConfig(String name) {
+ GetServingConfigRequest request = GetServingConfigRequest.newBuilder().setName(name).build();
+ return getServingConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * GetServingConfigRequest request =
+ * GetServingConfigRequest.newBuilder()
+ * .setName(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .build();
+ * ServingConfig response = servingConfigServiceClient.getServingConfig(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 ServingConfig getServingConfig(GetServingConfigRequest request) {
+ return getServingConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * GetServingConfigRequest request =
+ * GetServingConfigRequest.newBuilder()
+ * .setName(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ * for (ServingConfig element :
+ * servingConfigServiceClient.listServingConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The catalog resource name. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName parent) {
+ ListServingConfigsRequest request =
+ ListServingConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listServingConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all ServingConfigs linked to this catalog.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+ * for (ServingConfig element :
+ * servingConfigServiceClient.listServingConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The catalog resource name. Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServingConfigsPagedResponse listServingConfigs(String parent) {
+ ListServingConfigsRequest request =
+ ListServingConfigsRequest.newBuilder().setParent(parent).build();
+ return listServingConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all ServingConfigs linked to this catalog.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ListServingConfigsRequest request =
+ * ListServingConfigsRequest.newBuilder()
+ * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ServingConfig element :
+ * servingConfigServiceClient.listServingConfigs(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 ListServingConfigsPagedResponse listServingConfigs(
+ ListServingConfigsRequest request) {
+ return listServingConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all ServingConfigs linked to this catalog.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ListServingConfigsRequest request =
+ * ListServingConfigsRequest.newBuilder()
+ * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ListServingConfigsRequest request =
+ * ListServingConfigsRequest.newBuilder()
+ * .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListServingConfigsResponse response =
+ * servingConfigServiceClient.listServingConfigsCallable().call(request);
+ * for (ServingConfig element : response.getServingConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ServingConfigName servingConfig =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]");
+ * ServingConfig response = servingConfigServiceClient.addControl(servingConfig);
+ * }
+ * }
+ *
+ * @param servingConfig Required. The source ServingConfig resource name . Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig addControl(ServingConfigName servingConfig) {
+ AddControlRequest request =
+ AddControlRequest.newBuilder()
+ .setServingConfig(servingConfig == null ? null : servingConfig.toString())
+ .build();
+ return addControl(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a Control on the specified ServingConfig. The control is added in the last position of
+ * the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the
+ * last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has
+ * already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum
+ * number of control allowed for that type of control.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String servingConfig =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString();
+ * ServingConfig response = servingConfigServiceClient.addControl(servingConfig);
+ * }
+ * }
+ *
+ * @param servingConfig Required. The source ServingConfig resource name . Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig addControl(String servingConfig) {
+ AddControlRequest request =
+ AddControlRequest.newBuilder().setServingConfig(servingConfig).build();
+ return addControl(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a Control on the specified ServingConfig. The control is added in the last position of
+ * the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the
+ * last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has
+ * already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum
+ * number of control allowed for that type of control.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * AddControlRequest request =
+ * AddControlRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setControlId("controlId-395080872")
+ * .build();
+ * ServingConfig response = servingConfigServiceClient.addControl(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 ServingConfig addControl(AddControlRequest request) {
+ return addControlCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Enables a Control on the specified ServingConfig. The control is added in the last position of
+ * the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the
+ * last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has
+ * already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum
+ * number of control allowed for that type of control.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * AddControlRequest request =
+ * AddControlRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setControlId("controlId-395080872")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * ServingConfigName servingConfig =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]");
+ * ServingConfig response = servingConfigServiceClient.removeControl(servingConfig);
+ * }
+ * }
+ *
+ * @param servingConfig Required. The source ServingConfig resource name . Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig removeControl(ServingConfigName servingConfig) {
+ RemoveControlRequest request =
+ RemoveControlRequest.newBuilder()
+ .setServingConfig(servingConfig == null ? null : servingConfig.toString())
+ .build();
+ return removeControl(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a Control on the specified ServingConfig. The control is removed from the
+ * ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * String servingConfig =
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString();
+ * ServingConfig response = servingConfigServiceClient.removeControl(servingConfig);
+ * }
+ * }
+ *
+ * @param servingConfig Required. The source ServingConfig resource name . Format:
+ * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ServingConfig removeControl(String servingConfig) {
+ RemoveControlRequest request =
+ RemoveControlRequest.newBuilder().setServingConfig(servingConfig).build();
+ return removeControl(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a Control on the specified ServingConfig. The control is removed from the
+ * ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * RemoveControlRequest request =
+ * RemoveControlRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setControlId("controlId-395080872")
+ * .build();
+ * ServingConfig response = servingConfigServiceClient.removeControl(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 ServingConfig removeControl(RemoveControlRequest request) {
+ return removeControlCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Disables a Control on the specified ServingConfig. The control is removed from the
+ * ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * RemoveControlRequest request =
+ * RemoveControlRequest.newBuilder()
+ * .setServingConfig(
+ * ServingConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[SERVING_CONFIG]")
+ * .toString())
+ * .setControlId("controlId-395080872")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
+ * ServingConfigServiceSettings.newBuilder();
+ * servingConfigServiceSettingsBuilder
+ * .createServingConfigSettings()
+ * .setRetrySettings(
+ * servingConfigServiceSettingsBuilder
+ * .createServingConfigSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ServingConfigServiceSettings servingConfigServiceSettings =
+ * servingConfigServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ServingConfigServiceSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ * Control control = Control.newBuilder().build();
+ * String controlId = "controlId-395080872";
+ * Control response = controlServiceClient.createControl(parent, control, controlId);
+ * }
+ * }
+ *
* {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ServingConfigServiceClient servingConfigServiceClient =
+ * ServingConfigServiceClient.create()) {
+ * CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+ * ServingConfig servingConfig = ServingConfig.newBuilder().build();
+ * String servingConfigId = "servingConfigId-831052759";
+ * ServingConfig response =
+ * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
+ * ControlServiceStubSettings.newBuilder();
+ * controlServiceSettingsBuilder
+ * .createControlSettings()
+ * .setRetrySettings(
+ * controlServiceSettingsBuilder
+ * .createControlSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ControlServiceStubSettings extends StubSettings